nix-openwrt-imagebuilder icon indicating copy to clipboard operation
nix-openwrt-imagebuilder copied to clipboard

fix some imagebuilder not including variant in the name

Open cramt opened this issue 10 months ago • 5 comments

Some imagebuilders just dont have the variant in their name for.... reasons (example tplink-archer-c5-v2), took a while to debug but the fix is trivial to just add a baseFileName without the variant to the list of possible names

sorry about the formatting, ill use your formatting config if you want me to

cramt avatar Feb 21 '25 22:02 cramt

NixCI is ready to run on this PR. Maintainer: Comment nix-ci run to run now.

nix-ci-app[bot] avatar Feb 21 '25 22:02 nix-ci-app[bot]

Thank you!

The diff is hard to read, so I would love to have the reformatting in a separate commit, if you think the reformatting makes sense.

astro avatar Feb 22 '25 16:02 astro

Even a word-diff isn't helpful here. Did you reformat automatically? Which tool did you use? I could try redoing it myself in a separate commit.

astro avatar Sep 09 '25 18:09 astro

oh sorry i completely forgot about this, the actual change is just this

        baseFileNames = [
          "${imageBuilderPrefix}${target}-${variant}.${uname.system}-${uname.processor}"
          "${imageBuilderPrefix}${target}.${uname.system}-${uname.processor}"
        ];
        possibleFileNames = lib.lists.flatten (builtins.map (extension: builtins.map (baseFileName: "${baseFileName}${extension}") baseFileNames) [".tar.zst" ".tar.xz"]);
        matches = builtins.filter (fileName: builtins.hasAttr fileName variantFiles) possibleFileNames;

cramt avatar Sep 10 '25 06:09 cramt

yeah might be best to do in a seperate commit due to there also being merge conflicts with this pr

cramt avatar Sep 10 '25 06:09 cramt