nixpkgs/pkgs/os-specific/darwin/stubs/default.nix
Jörg Thalheim dadc7eb329
treewide: use runtimeShell instead of stdenv.shell whenever possible
Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
2019-02-26 14:10:49 +00:00

16 lines
323 B
Nix

{ stdenv, writeScriptBin, runtimeShell }:
let fake = name: stdenv.lib.overrideDerivation (writeScriptBin name ''
#!${runtimeShell}
echo >&2 "Faking call to ${name} with arguments:"
echo >&2 "$@"
'') (drv: {
name = "${name}-stub";
}); in
{
setfile = fake "SetFile";
rez = fake "Rez";
derez = fake "DeRez";
}