but building something that depends on it seems to try to build it:
~ $ nix-build /nix/store/nfqilgw5sv0dsv7m0wvgh0jqi65dc520-pcre-light-0.4.1.0.drv
these derivations will be built:
/nix/store/fw1rn6nh4mydpsg4zvb5wq4ylbfivcwr-pcre-8.44.drv
/nix/store/nfqilgw5sv0dsv7m0wvgh0jqi65dc520-pcre-light-0.4.1.0.drv
these paths will be fetched (143.30 MiB download, 1409.56 MiB unpacked):
/nix/store/0qpfsz8xj1g2fbw28k1049pxci0jmmac-gnugrep-3.4
/nix/store/6xxam2hm83h5hbihm6ppxyvssi86wjw0-call-stack-0.1.0
/nix/store/l0vn78f1q59q8j41qcnfhygwpk65fw7i-HUnit-1.6.0.0
/nix/store/s7kbnrgsf495zg5gj2ka8r23sga19kzn-gcc-wrapper-9.2.0
/nix/store/wx2xwdxjc1zvb2vlbng98k8g6bqa6z5j-ghc-8.6.5
/nix/store/xylrsrjwnhmr6pgz2c7zzj5nl41qps8a-stdenv-linux
…
and at the end it fails in a weird way, I guess because install tries to override what’s already there:
I completely wiped my installation, and started the build (via hercules-ci, not locally), and I spotted this in the logs. Not sure if it is related.
while retrieving dependencies: CppStdException "Exception: path '/nix/store/nnsdf11zg16bq5b6kf2q75i63c7qdh6n-pcre-8.44-dev' does not exist and cannot be created; type: nix::Error"
unable to retrieve dependency; attempting fallback to local build
Anyways, even after wiping /nix I get
copying path '/nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44' from 'https://kaleidogen.cachix.org'
…
~ $ nix-store --delete --ignore-liveness /nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44
finding garbage collector roots...
deleting '/nix/store/0qpfsz8xj1g2fbw28k1049pxci0jmmac-gnugrep-3.4'
deleting '/nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44'
deleting '/nix/store/trash'
deleting unused links...
note: currently hard linking saves -0.00 MiB
2 store paths deleted, 0.72 MiB freed
~ $ nix-store --realize /nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44
these paths will be fetched (0.16 MiB download, 0.47 MiB unpacked):
/nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44
copying path '/nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44' from 'https://kaleidogen.cachix.org'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/j72c0vfp2lnzsnpai3rf9w207c50cqik-pcre-8.44
~ $ nix-store --realize /nix/store/nnsdf11zg16bq5b6kf2q75i63c7qdh6n-pcre-8.44-dev
don't know how to build these paths:
/nix/store/nnsdf11zg16bq5b6kf2q75i63c7qdh6n-pcre-8.44-dev
nix develop
claims to try to fetch/build ~300 packages
nix --substituters "" develop
is trying to install 900 packages. I suspect libunistring is just the first of many packages that would have this issue. I also can’t remove the file from the store even with ignore-liveness because apparently it has other referents.
I’m only using cache.nixos.org, so this is with the default binary cache.
The build probably needed libunistring.dev or something, so getting that from cache should work around it. Overall this is a bug in Nix; I think I’ve already seen it, maybe it’s even long fixed if you’re still using Nix 2.3.x.
Thanks! I didn’t even realize there was a dev attr. I upgraded to 2.7 yesterday hoping it would fix things but to no avail. I tried getting libunistring.dev, now it’s failing to build curl - I was suspecting this was the first of many of this type of issue.