Description
Describe the bug
When I build a content addressed derivation with
nix store make-content-addressed nixpkgs#hello
nix copy --to "file://$PWD/temporary-cache?compression=zstd" /nix/store/ysk9lpkljlk6kf33rigng5hjhjvrll8i-hello-2.12.1
nix-store --delete /nix/store/ysk9lpkljlk6kf33rigng5hjhjvrll8i-hello-2.12.1
nix copy --from file://$PWD/temporary-cache /nix/store/ysk9lpkljlk6kf33rigng5hjhjvrll8i-hello-2.12.1
There is a realisations
folder and I can copy the derivation from the temporary store.
However, if i use an S3 store with:
nix build --impure --expr '(import <nixpkgs> { config.contentAddressedByDefault = true; }).bash'
nix copy --to 's3://nix-cache?profile=nixbuilder&endpoint=s3.hel.lan®ion=eu-central-1' /nix/store/vif5q2hs10x4cr6bb5fs8d8la9j1ygf0-bash-5.2p32
nix-store --delete /nix/store/vif5q2hs10x4cr6bb5fs8d8la9j1ygf0-bash-5.2p32
nix build --impure --expr '(import <nixpkgs> { config.contentAddressedByDefault = true; }).bash' --extra-substituters "https://s3.hel.lan/nix-cache/" -j0
it doesn't fetch bash
and tries to build it. If I remove -j0
it builds bash
but still does not use the cache.
All the builds are automatically signed by nix.settings.secret-key-files
and the public key is used by nix.settings.trusted-public-keys
Also, there is no realisations
folder in my s3 bucket.
Steps To Reproduce
See above
Expected behavior
There should be no need to rebuild bash
but should be fetched from the s3 store
nix-env --version
output
nix-env (Nix) 2.18.8
Additional context
AFAIK there is no cache software (nix-serve, nix-serve-ng, harmonia, attic) that provides the realisations
endpoint. How does this work with hydra
in light of NixOS/hydra#838 ? How does the test cache from https://discourse.nixos.org/t/content-addressed-nix-call-for-testers/12881 (https://cache.ngi0.nixos.org) get populated by ca-derivations?
Priorities
Add 👍 to issues you find important.
Activity