Error for a package that is not in the flake.nix

Why am I still getting an error for a package that is not in the flake.nix anymore after a nix flake update ?

Here’s my flake.nix

This is the error:

initramfs> cp: cannot stat '/nix/store/my861c9wn4jrdv1big767qjkcgxv5da1-acl-2.3.1-bin/lib/libacl.so.1': No such file or directory
error: builder for '/nix/store/na7p2sdpzcqzxa5sz8p4r0pa54i3m4jc-initramfs.drv' failed with exit code 1;
       last 6 log lines:
       > patching sources
       > updateAutotoolsGnuConfigScriptsPhase
       > configuring
       > no configure script, doing nothing
       > building
       > cp: cannot stat '/nix/store/my861c9wn4jrdv1big767qjkcgxv5da1-acl-2.3.1-bin/lib/libacl.so.1': No such file or directory
       For full logs, run:
         nix log /nix/store/na7p2sdpzcqzxa5sz8p4r0pa54i3m4jc-initramfs.drv
error: 1 dependencies of derivation '/nix/store/0v7wzc9zcyzbvv16vaql14d2gq7m5kvi-disk-image.drv' failed to build
cmyk@ubuntu:~/seedetcher$ nix log /nix/store/na7p2sdpzcqzxa5sz8p4r0pa54i3m4jc-initramfs.drv
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
cp: cannot stat '/nix/store/my861c9wn4jrdv1big767qjkcgxv5da1-acl-2.3.1-bin/lib/libacl.so.1': No such file or directory

Thanks!

What output are you building?

I am building .#image-debug

Also, I saw you’re using the nixpkgs 23.11 tag, which is both definitely unsupported by now, and the wrong thing to use (you should be using a branch instead).

I have no idea. New to this. :sweat_smile:
It built fine before adding the acl-2.3.1-bin/lib/libacl.so.1 (no version specified).
But adding it errors out even when I remove it and do a garbage collection.

Well your error is referring to acl, so yes, naturally that makes sense if that package does not have that file. Also, you’ll likely need to select the correct output, via lib.getLib pkgs.acl, if you are using such interpolation. I’d make the same recommendation for the other packages where you need the /bin dirs - use lib.getBin.

1 Like

Sorry, I don’t quite follow. I removed the tag and did

nix flake update
nix flake update nixpkgs

then rebuilt. Same error.
But what I don’t understand is, why this did not occur before I added acl?
And now when I remove it, it’s still erroring out.

You need to use lib.getLib pkgs.acl not pkgs.acl in your interpolation. acl has multiple outputs.

1 Like

I tried cp ${lib.getLib pkgs.acl}/lib/libacl.so.1 initramfs/lib/

No dice!
And what if I don’t want it?

You should probably do the same with the other copy operations, to be on the safe side.

But they worked fine and the others are commented out.
Comments are respected, are they not?

@waffle8946
I updated my flake.nix …

… and completely removed nix. Then re-installed it.
I ran the built #image-debug egain and I am still getting this:

controller-armv6l-unknown-linux-musleabihf> source root is dqm96nk03qayafx4gfmg11d8d6fpsqxn-source
controller-armv6l-unknown-linux-musleabihf> patching sources
controller-armv6l-unknown-linux-musleabihf> updateAutotoolsGnuConfigScriptsPhase
controller-armv6l-unknown-linux-musleabihf> configuring
controller-armv6l-unknown-linux-musleabihf> no configure script, doing nothing
controller-armv6l-unknown-linux-musleabihf> building
controller-armv6l-unknown-linux-musleabihf> installing
controller-armv6l-unknown-linux-musleabihf> post-installation fixup
initramfs> patching sources
initramfs> updateAutotoolsGnuConfigScriptsPhase
initramfs> configuring
initramfs> no configure script, doing nothing
initramfs> building
initramfs> cp: cannot stat '/nix/store/my861c9wn4jrdv1big767qjkcgxv5da1-acl-2.3.1-bin/lib/libacl.so.1': No such file or directory
error: builder for '/nix/store/0jv5izi89g4ibx4whprwq20qkc7hli8v-initramfs.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/1fq0ch5ql5m1vplsp9m9ff9s4m4ymqqa-disk-image.drv' failed to build

I am at my wits end.

Lol! My bad! I confused my local git repo with the repo on the vm.
When I cleaned up the VM repo and build it went through.
Maybe I shouldn’t be working on stuff at 2am.
Thank you!!