Can i get assistance on resolving this? Or, is this an issue that the developer has to resolve?
type or paste code herbuilding the system configuration...
error: hash mismatch in fixed-output derivation '/nix/store/1cswdsk3kcx2rx1dzvsy25a4sv2667wl-source.drv':
specified: sha256-IHWBvPEl0RN/0j8FaeAhlzWPeitC3bBgUCAj49aPLpw=
got: sha256-BnDS1n1aIQh9HJZeZv0hR7vo2l6Kf9B/11fYFbb/cpQ=
error: 1 dependencies of derivation '/nix/store/90rncdvhzk6bngh3xrhrpgcsi311apbv-cimg-3.4.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/2jgzjb3cwzpiwzdgplmmqmc94k9c5j2s-gmic-qt-gimp-3.3.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l9h912nl4da2b30nzj8a2ksnjgja3az6-gimp-with-plugins-2.10.38.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ss4k0fpxpk7953ack9qd0b98rmnk6fjh-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/d2ccy3igami4wz2ahq3v5v28jms3i0zj-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x5rfr1hz94qb9m2w363vap9dgvwsnjw0-user-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5kykzxd5f511hvk7yl3540jldidkgdn4-etc.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-xwayland-24.1.0.drv-0': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-nerdfonts-3.2.1.drv-0': Directory not empty
error (ignored): error: cannot unlink '/tmp/nix-build-google-fonts-unstable-2023-10-20.drv-0/source/ofl': Directory not empty
error: 1 dependencies of derivation '/nix/store/diksxw011fwa4673n2amij4lq460x18g-nixos-system-opx-5090-24.11.20240616.b60ebf5.drv' failed to builde
ghpzin
June 18, 2024, 7:08pm
2
Reading on it that was an upstream issue - they moved tag (so hash changed) after version bump in nixpkgs:
NixOS:master
ā r-ryantm:auto-update/cimg
opened 05:48AM - 15 Jun 24 UTC
Automatic update generated by [nixpkgs-update](https://github.com/ryantm/nixpkgsā¦ -update) tools. This update was made based on information from https://repology.org/project/cimg/versions.
meta.description for cimg is: Small, open source, C++ toolkit for image processing
meta.homepage for cimg is: http://cimg.eu/
###### Updates performed
- Version update
###### To inspect upstream changes
- [Compare changes on GitHub](https://github.com/GreycLab/CImg/compare/v.3.3.6...v.3.4.0)
###### Impact
<b>Checks done</b>
---
- built on NixOS
- The tests defined in `passthru.tests`, if any, passed
- found 3.4.0 in filename of file in /nix/store/44l1nhqnr7fsjhrm175vbys6f6s4an9k-cimg-3.4.0
---
<details>
<summary>
<b>Rebuild report</b> (if merged into master) (click to expand)
</summary>
```
12 total rebuild path(s)
12 package rebuild(s)
First fifty rebuilds by attrpath
ansel
cimg
darktable
gimp-with-plugins
gimpPlugins.gmic
gmic
gmic-qt
imgcat
openroad
phash
photoprism
```
</details>
<details>
<summary>
<b>Instructions to test this update</b> (click to expand)
</summary>
---
Either **download from Cachix**:
```
nix-store -r /nix/store/44l1nhqnr7fsjhrm175vbys6f6s4an9k-cimg-3.4.0 \
--option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
--option trusted-public-keys '
nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
'
```
(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the `trusted-users` list or you can use `sudo` since root is effectively trusted.
Or, **build yourself**:
```
nix-build -A cimg https://github.com/r-ryantm/nixpkgs/archive/8e358c05aab7f96e4ec8d1dab493fbab124894e6.tar.gz
```
Or:
```
nix build github:r-ryantm/nixpkgs/8e358c05aab7f96e4ec8d1dab493fbab124894e6#cimg
```
After you've downloaded or built it, look at the files and if there are any, run the binaries:
```
ls -la /nix/store/44l1nhqnr7fsjhrm175vbys6f6s4an9k-cimg-3.4.0
ls -la /nix/store/44l1nhqnr7fsjhrm175vbys6f6s4an9k-cimg-3.4.0/bin
```
---
</details>
<br/>
### Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as _failed to build_ independent of the
change, simply because they are already broken on the target branch.
Result of `nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }'` run on x86_64-linux [1](https://github.com/Mic92/nixpkgs-review)
<details>
<summary>15 packages built:</summary>
<ul>
<li>ansel</li>
<li>cimg</li>
<li>cimg.doc</li>
<li>darktable</li>
<li>gimp-with-plugins</li>
<li>gimpPlugins.gmic</li>
<li>gmic</li>
<li>gmic-qt</li>
<li>gmic.dev</li>
<li>gmic.lib</li>
<li>gmic.man</li>
<li>imgcat</li>
<li>openroad</li>
<li>phash</li>
<li>photoprism</li>
</ul>
</details>
---
###### Maintainer pings
cc @AndersonTorres @lilyinstarlight for [testing](https://github.com/ryantm/nixpkgs-update/blob/main/doc/nixpkgs-maintainer-faq.md#r-ryantm-opened-a-pr-for-my-package-what-do-i-do).
PR with fixed hash was merged:
NixOS:master
ā fabaff:cimg-fix-hash
opened 08:48AM - 16 Jun 24 UTC
## Description of changes
<!--
For package updates please link to a changeloā¦ g or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
## Things done
- Built on platform(s)
- [ ] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] `sandbox = relaxed`
- [ ] `sandbox = true`
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [24.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2411.section.md) (or backporting [23.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) and [24.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2405.section.md) Release notes)
- [ ] (Package updates) Added a release notes entry if the change is major or breaking
- [ ] (Module updates) Added a release notes entry if the change is significant
- [ ] (Module addition) Added a release notes entry if adding a new NixOS module
- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions
-->
---
Add a :+1: [reaction] to [pull requests you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc
But it did not get to nixos-unstable
as of now, when it gets there you would need to update and it should be fixed:
https://nixpk.gs/pr-tracker.html?pr=320204
Thank you. I sort of figured that was my only option, but i had not encountered one of these before.
ghpzin
June 18, 2024, 7:44pm
4
I would not say itās your only option.
There are a lot of options to build your system right now:
stay on nixos-unstable
version before that cimg
version bump and wait until hash fix get there.
do not use cimg
or anything that depends on it
overlay that package with fixed hash
But the easiest would be to just wait until it gets to nixos-unstable
(option 1).
I appreciate the additional information. I forgot about using an overlay. I think I will just heed your advice and stick with waiting for the hash to get updated by the developerā¦
1 Like
l0b0
June 20, 2024, 7:33am
6
How exactly do I do that in configuration.nix? I canāt seem to find a good reference, only hints. I tried this:
nixpkgs.overlays = [
(_final: prev: {
inherit
(import pkgs.fetchzip
{
url = "https://github.com/fabaff/nixpkgs/archive/cimg-fix-hash.tar.gz";
sha256 = "sha256-BnDS1n1aIQh9HJZeZv0hR7vo2l6Kf9B/11fYFbb/cpQ=";
}
{
overlays = [ ];
inherit (prev) config;
}
)
cimg
;
})
];
That one fails with āerror: cannot coerce a set to a stringā.
I also tried this:
nixpkgs.overlays = [
(_final: prev: {
cimg = prev.cimg.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
(pkgs.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/320204.patch";
hash = "sha256-qg+mkhZQE/H9aNjXRFn+Kh7u+Zse2mxubFz+XB9/Dj8=";
})
];
});
})
];
It builds, but I still get the original error:
error: hash mismatch in fixed-output derivation '/nix/store/1cswdsk3kcx2rx1dzvsy25a4sv2667wl-source.drv':
specified: sha256-IHWBvPEl0RN/0j8FaeAhlzWPeitC3bBgUCAj49aPLpw=
got: sha256-BnDS1n1aIQh9HJZeZv0hR7vo2l6Kf9B/11fYFbb/cpQ=
ghpzin
June 20, 2024, 3:31pm
7
Not sure what first is supposed to do.
But second wonāt work, because you are trying to apply patch to package src
, not .nix
file in nixpkgs where hash
is.
You need to either patch nixpkgs with something like:
let
nixpkgsPatches = [
{
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/320204.patch";
hash = "sha256-qg+mkhZQE/H9aNjXRFn+Kh7u+Zse2mxubFz+XB9/Dj8=";
}
];
pkgsOrigin = (import nixpkgs { inherit system; });
pkgsPatched = (
pkgsOrigin.applyPatches {
name = "nixpkgs-patched";
src = inputs.nixpkgs;
patches = map pkgsOrigin.fetchpatch nixpkgsPatches;
}
);
pkgs = import pkgsPatched { inherit system; };
in
...
(there may or may not be extra import there, not sure)
or overrideAttrs
with src
:
overlays = [
(final: prev: {
cimg = prev.cimg.overrideAttrs (old: {
src = prev.pkgs.fetchFromGitHub {
owner = "GreycLab";
repo = "CImg";
rev = "refs/tags/v.3.4.0";
hash = "sha256-BnDS1n1aIQh9HJZeZv0hR7vo2l6Kf9B/11fYFbb/cpQ=";
};
});
})
];
Thought itās probably too late, because fix already got to nixos-unstable
.