Print the env via stderr

This commit is contained in:
Rodrigo Arias 2020-09-22 18:38:25 +02:00
parent ebd947c544
commit e3623b05fd

View File

@ -7,16 +7,16 @@
}: }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "argv"; name = "envRecord";
preferLocalBuild = true; preferLocalBuild = true;
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = '' installPhase = ''
cat > $out <<EOF cat > $out <<EOF
#!/bin/sh #!/bin/sh
echo ----- ENV BEGIN ------- >&2 echo ----- ENV BEGIN -------
/usr/bin/env >&2 /usr/bin/env
echo ----- ENV END ------- >&2 echo ----- ENV END -------
exec ${program} \''${argv[@]} exec ${program} \''${argv[@]}
EOF EOF