# HG changeset patch # User Martin Bornhold # Date 2016-10-13 12:04:23 # Node ID 34ed18c253a9c72ec37f5517f72520301cc55bb0 # Parent ea99aabbea8af09ddf069a42b5db06af6ce4a291 nix: Use --set instead of --prefix for setting the PATH / PYTHONPATH Using --set will not append the system PATH / PYTHONPATH to the environment variable during wraping of executables. This will "lock-out" programs and python modules from the system and only allow the ones which are set during wrapping. This means e.g. of git we make only our custom git available and if thats missing we get an error instead of silently using the system git (if installed) diff --git a/default.nix b/default.nix --- a/default.nix +++ b/default.nix @@ -133,8 +133,8 @@ let for file in $out/bin/*; do wrapProgram $file \ - --prefix PATH : $PATH \ - --prefix PYTHONPATH : $PYTHONPATH \ + --set PATH $PATH \ + --set PYTHONPATH $PYTHONPATH \ --set PYTHONHASHSEED random done '';