diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 522654281f11c..08c6bcdcbb98c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1448,6 +1448,12 @@ with pkgs; #package writers writers = callPackage ../build-support/writers { }; + # Useful for creating /usr/bin/env in a build environment to run build scripts with #!/usr/bin/env shebang + usrBinEnv = makeSetupHook { name = "create-usr-bin-env"; } (pkgs.writeText "create-usr-bin-env.sh" '' + mkdir -m 0755 -p /usr/bin + ln -sfn "${pkgs.coreutils}/bin/env" /usr/bin/env + ''); + # lib functions depending on pkgs inherit (import ../pkgs-lib { # The `lib` variable in this scope doesn't include any applied lib overlays,