Use only tools from Nixpkgs in activation script

Note, we still pull in the user's `PATH` in case the user has defined
their own activation blocks that depend on additional tools.
Eventually this will be deprecated and removed.

See #99.
This commit is contained in:
Robert Helgesson 2017-10-20 14:02:05 +02:00
parent b9f49cee45
commit 30b9d7f00e
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86
5 changed files with 43 additions and 3 deletions

View file

@ -64,6 +64,8 @@ in
"${cfg.homeInfoDirLocation}\${INFOPATH:+:}\${INFOPATH}";
home.activation.createHomeInfoDir = dagEntryAfter ["installPackages"] ''
oPATH=$PATH
export PATH="${lib.makeBinPath [ pkgs.gzip ]}''${PATH:+:}$PATH"
$DRY_RUN_CMD mkdir -p "${cfg.homeInfoDirLocation}"
$DRY_RUN_CMD rm -f "${cfg.homeInfoDirLocation}/dir"
if [[ -d "${homeInfoPath}" ]]; then
@ -71,6 +73,8 @@ in
-exec $DRY_RUN_CMD ${infoPkg}/bin/install-info '{}' \
"${cfg.homeInfoDirLocation}/dir" \;
fi
export PATH="$oPATH"
unset oPATH
'';
home.packages = [ infoPkg ];