astro / nix-openwrt-imagebuilder

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

Building from snapshot - error cached-profiles/snapshot.nix #37

Closed joe2xyz closed 7 months ago

joe2xyz commented 7 months ago

Hi @astro ,

Thank you very much for this project, it's fantastic!

I followed the following steps:

git clone <this> && cd nix-openwrt-imagebuilder
nix run .#generate-hashes snapshot
nix build --override-input openwrt-imagebuilder "git+file://$(pwd)" .....

The .... is a directory with a flake - pretty much just your example with one change:

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

But I get an error:

error: getting status of '/nix/store/jja09jalv7h719v3f2q0q9y6282qqxd1-source/cached-profiles/snapshot.nix': No such file or directory

I realized that I'm missing a file in cached-profiles and I decided to run:

nix run .#cached-profiles snapshot

which after long run ended up with

error: unable to execute '/nix/store/qfsrqgfd8zz1fch7z6pw9qsapgcvpd5a-openwrt-cached-profiles/bin/openwrt-cached-profiles': No such file or directory

Could you please tell how to build a snapshot?

Thank you.

astro commented 7 months ago

Thank you for your report!

.#cached-profiles is to be built with plain nix build but it snapshot is now fetched by the Github action, too.

Please pull and retry.

joe2xyz commented 7 months ago

It is working! Thank you @astro , amazing tool!