Mic92 / nixos-aarch64-images

Build NixOS images for various ARM single computer boards
65 stars 17 forks source link

fixed output derivation 'nixos-sd-image-23.11.5541.56528ee42526-aarch64-linux.img.zst' is not allowed to refer to other store paths. #21

Open gabevenberg opened 1 month ago

gabevenberg commented 1 month ago

just trying to build the image from the flake, getting:

> nix build --no-write-lock-file 'github:Mic92/nixos-aarch64-images#rockPro64'
error: fixed output derivation 'nixos-sd-image-23.11.5541.56528ee42526-aarch64-linux.img.zst' is not allowed to refer to other store paths.
       You may need to use the 'unsafeDiscardReferences' derivation attribute, see the manual for more details.
Mic92 commented 1 month ago

The error message is right, we need something, like:

https://github.com/nix-community/nix-index-database/pull/103/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0R33

Could you try to add this? I currently don't have the hardware around for testing.

gabevenberg commented 1 month ago

The error message is right, we need something, like:

nix-community/nix-index-database#103 (files)

Could you try to add this? I currently don't have the hardware around for testing.

Sure thing. Ill test this weekend.

gabevenberg commented 1 month ago

@Mic92 Im not entirely sure where to put it. I tried doing the same thing as the example, using overrideAttrs on the one fetchUrl, as well as putting __structuredAttrs = true; unsafeDiscardReferences.out = true; directly in the mkDerivation attrsets, with the first leading to an eval error and the second having no effect. (Ive configured nixos before, but never packaged anything, so I have very little idea of what im doing.)

If you want to make a branch, id be happy to test any changes for you on a rockpro64.