1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

home-environment: clean up activation script creation

This commit is contained in:
Cornelius Mika 2017-11-06 10:28:48 +01:00 committed by Robert Helgesson
parent 811bc1b8e5
commit f04cc227a6
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -265,7 +265,7 @@ in
pkgs.nix pkgs.nix
]; ];
sf = pkgs.writeText "activation-script" '' activationScript = pkgs.writeScript "activation-script" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
set -eu set -eu
@ -286,7 +286,9 @@ in
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = '' installPhase = ''
install -D -m755 ${sf} $out/activate mkdir -p $out
cp ${activationScript} $out/activate
substituteInPlace $out/activate \ substituteInPlace $out/activate \
--subst-var-by GENERATION_DIR $out --subst-var-by GENERATION_DIR $out