astro / nix-openwrt-imagebuilder

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

Do not use `/usr/bin/env`, it doesn't exist #27

Closed jfly closed 1 year ago

jfly commented 1 year ago

This fixes https://github.com/astro/nix-openwrt-imagebuilder/issues/26.

I also removed the grep -r usr/bin/env while I was in here. I don't really understand its purpose: it finds and prints all lines containing "usr/bin/env". I thought perhaps the purpose if it was to remind us to always substitute all references to usr/bin/env, but that's definitely not it as it is actually finding stuff (some perl stuff and a few other things that I didn't bother to fix because I didn't run into issues with them). In fact, if it didn't find something, it would exit nonzero and break the build! I could instead tweak this to enforce that there simply are not occurrences of usr/bin/env whatsoever, but that would make things a little messier as I'd have to do a bunch of substitutions of dubious value to make it happy.

astro commented 1 year ago

That was probably a debugging leftover. Thank you!