astro / nix-openwrt-imagebuilder

Build OpenWRT images in Nix derivations
MIT License
129 stars 16 forks source link

error: attribute 'libubox20220927' missing #30

Closed jfly closed 1 year ago

jfly commented 1 year ago

I put together a simple repo here:

$ nix build github:jfly/nix-openwrt-imagebuilder-bug-demo/missing-libubox20220927#my-router
error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'openwrt-23.05.0-rc1-nix-mediatek-mt7622-linksys_e8450-ubi'
         whose name attribute is located at /nix/store/p57nnwjhfvmsn75y9l6hn00pl2xv7ivm-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'configurePhase' of derivation 'openwrt-23.05.0-rc1-nix-mediatek-mt7622-linksys_e8450-ubi'

         at /nix/store/xkw95d1jbwm42pmvwm7pmcvkk3788c58-source/builder.nix:70:3:

           69|
           70|   configurePhase =
             |   ^
           71|     let

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'libubox20220927' missing

       at /nix/store/xkw95d1jbwm42pmvwm7pmcvkk3788c58-source/files.nix:180:20:

          179|             with_new_dep = current_deps // { ${new_dep} = true; };
          180|             deps = packages.${new_dep}.depends;
             |                    ^
          181|           in
astro commented 1 year ago

There is a new OpenWRT prerelease "23.05.0-rc1" which is still incomplete. This caused trouble before!

Fix by pinning to the stable API:

--- flake.nix
+++ flake.nix
@@ -8,7 +8,7 @@
       let
         pkgs = nixpkgs.legacyPackages.x86_64-linux;

-        profiles = openwrt-imagebuilder.lib.profiles { inherit pkgs; };
+        profiles = openwrt-imagebuilder.lib.profiles { inherit pkgs; release = "22.03.5"; };

         image = profiles.identifyProfile "linksys_e8450-ubi";
       in

Should I rather filter out -rc versions?

jfly commented 1 year ago

Ah, thank you! What if I want to follow the latest, non-prelease version?

astro commented 1 year ago

Given the problems we encounter with the prelreleases, I am starting to think that nobody wants that in their unattended image building pipeline. Stable OpenWrt releases only from now on!

I just hope this won't repeat itself while the .0 release is being uploaded... :-)