I’m upgrading a project to nixpkgs-20.09 and I’m running into a problem building the jre
package on x86_64-linux.
Note that I disable the upstream Nix cache (cache.nixos.org) to ensure our own cache will contain all required dependencies to build my project.
Note the failure when I run the following in nixpkgs
on branch release-20.09
on revision dcc62359cd517eed9e201dafb076a452367a326b:
$ nix-build -A jre
these derivations will be built:
/nix/store/55qlj9cq22i7qkkw19xcmcw2y1scc093-nashorn-jdk8u272-b10.tar.gz.drv
/nix/store/c82w44q9al45alcy8sgrvsxlqi925ws0-langtools-jdk8u272-b10.tar.gz.drv
/nix/store/d5z62h83yp3mkk7m9fm9bfs87yzzlcpg-jdk8-jdk8u272-b10.tar.gz.drv
/nix/store/glfrj2i1qhvyfp304143fdw3nsbsnv34-hotspot-jdk8u272-b10.tar.gz.drv
/nix/store/j2vkxj2cahyzp59f3ncrfcgb2jn0ilw3-jaxp-jdk8u272-b10.tar.gz.drv
/nix/store/l6gzcwsyfyf3ifldwwp39lbkcbcb46gl-jdk-jdk8u272-b10.tar.gz.drv
/nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv
/nix/store/zp3yg0zh23xyd5812bcg99r60ir6vq1i-jaxws-jdk8u272-b10.tar.gz.drv
/nix/store/y4dzxwpbvrpxmha8c5s410bfcdxy4d38-openjdk-8u272-b10.drv
these paths will be fetched (12.81 MiB download, 65.81 MiB unpacked):
/nix/store/0akp8l3g38y6fzsqxxx9jqqvclv8hfns-polkit-0.116
/nix/store/0y4msdbr0jvh80mkqkzizh5x0bgxr9cv-gconf-3.2.6
/nix/store/127mdqmhbk6vfwifv9d39qhmzqs6v67m-gconf-3.2.6-dev
/nix/store/2yn3nirw4m5x64lffy3pym0hi46srjxy-gnome-vfs-2.24.4
/nix/store/6mh6c9rpgwkdcn5rd5jhjyr6r32amqns-dbus-glib-0.110
/nix/store/am74srim458p8sda7n9xv7jxkpi7xra8-avahi-0.7
/nix/store/f7q34r7m00xpiq297h9sinzpxcmmz16k-gtk+-2.24.32
/nix/store/f7xpkxhkn06yi09zd8a3wj1k915i4nmd-dbus-1.12.20
/nix/store/ijc9zwh7sssj2ilyspb58dhis8l5fzns-dbus-glib-0.110-dev
/nix/store/l69c28a72h6cbb8w6g59z0kwsy44qdx8-libusb-1.0.23
/nix/store/mym96ssf5sfyxk9pi55g5mka5j9yb62j-cups-2.3.3-lib
/nix/store/mzgf336rfc63nczc8kgzvzgwgvzykj4i-gnome-vfs-2.24.4-dev
/nix/store/pl1fpshm5mprh74266s1wnakah7kv695-cups-2.3.3
/nix/store/rpf6fxqpiqciiiwr0ih18bammbzc48a6-cups-2.3.3-dev
/nix/store/rxapwgz2hrj5y7d8wrqkhw6l7446f23c-dbus-1.12.20-lib
/nix/store/wmr1qk9dbmjp0pwrys6gx5fn32mgjgid-dbus-1.12.20-dev
/nix/store/wpaz3f5h69k7yai6i9kqcljqkgnfsdv9-gtk+-2.24.32-dev
building '/nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv'...
building '/nix/store/glfrj2i1qhvyfp304143fdw3nsbsnv34-hotspot-jdk8u272-b10.tar.gz.drv'...
building '/nix/store/j2vkxj2cahyzp59f3ncrfcgb2jn0ilw3-jaxp-jdk8u272-b10.tar.gz.drv'...
building '/nix/store/zp3yg0zh23xyd5812bcg99r60ir6vq1i-jaxws-jdk8u272-b10.tar.gz.drv'...
trying https://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/jdk8u272-b10.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
trying https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/jdk8u272-b10.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
trying https://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/archive/jdk8u272-b10.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
trying https://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/archive/jdk8u272-b10.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1356k 0 1356k 0 0 263k 0 --:--:-- 0:00:05 --:--:-- 274k
hash mismatch in fixed-output derivation '/nix/store/b6kgljakabikdc1br0ya5dh5q7qksc0w-corba-jdk8u272-b10.tar.gz':
wanted: sha256:163dganpd2g67ia3lcf05dvq2jpvz4brhmv2mvr1yg449kb9h01j
got: sha256:1jfj8gf2yfkj2dwbvnx5wj100yl36w984dhva3vqsfp53qfj0q6g
cannot build derivation '/nix/store/y4dzxwpbvrpxmha8c5s410bfcdxy4d38-openjdk-8u272-b10.drv': 1 dependencies couldn't be built
error: build of '/nix/store/y4dzxwpbvrpxmha8c5s410bfcdxy4d38-openjdk-8u272-b10.drv' failed
What’s strange about this is that the hash 163dganpd2g67ia3lcf05dvq2jpvz4brhmv2mvr1yg449kb9h01j
doesn’t occur anywhere in nixpkgs
and doesn’t match the specified hash of corba
:
What’s even stranger is that the derivation corresponds to what’s specified in its corresponding Nix expression:
$ nix show-derivation /nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv
{
"/nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv": {
"outputs": {
"out": {
"path": "/nix/store/pfa0baxqn3hi8ddwfh2bwjhm1qni1zn3-corba-jdk8u272-b10.tar.gz",
"hashAlgo": "sha256",
"hash": "320098d64c843c1ff2ae62579817f9fb4a81772bc0313a543ce68976ad7a6d98"
}
},
...
"env": {
...
"out": "/nix/store/pfa0baxqn3hi8ddwfh2bwjhm1qni1zn3-corba-jdk8u272-b10.tar.gz",
"outputHash": "320098d64c843c1ff2ae62579817f9fb4a81772bc0313a543ce68976ad7a6d98",
"outputHashAlgo": "sha256",
"outputHashMode": "flat",
...
}
}
}
But building it fails as before:
$ nix-build /nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv
these derivations will be built:
/nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv
building '/nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv'...
trying https://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/jdk8u272-b10.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1356k 0 1356k 0 0 318k 0 --:--:-- 0:00:04 --:--:-- 318k
hash mismatch in fixed-output derivation '/nix/store/b6kgljakabikdc1br0ya5dh5q7qksc0w-corba-jdk8u272-b10.tar.gz':
wanted: sha256:163dganpd2g67ia3lcf05dvq2jpvz4brhmv2mvr1yg449kb9h01j
got: sha256:1jfj8gf2yfkj2dwbvnx5wj100yl36w984dhva3vqsfp53qfj0q6g
error: build of '/nix/store/x524b90plb2xb53x2dhybx544kwlksw1-corba-jdk8u272-b10.tar.gz.drv' failed
What’s going on here?