From f04cc227a6b41c7d9775d5b9749dc8a99c844dc3 Mon Sep 17 00:00:00 2001 From: Cornelius Mika Date: Mon, 6 Nov 2017 10:28:48 +0100 Subject: [PATCH] home-environment: clean up activation script creation --- modules/home-environment.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 892c20cc..932f33f0 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -265,7 +265,7 @@ in pkgs.nix ]; - sf = pkgs.writeText "activation-script" '' + activationScript = pkgs.writeScript "activation-script" '' #!${pkgs.stdenv.shell} set -eu @@ -286,7 +286,9 @@ in phases = [ "installPhase" ]; installPhase = '' - install -D -m755 ${sf} $out/activate + mkdir -p $out + + cp ${activationScript} $out/activate substituteInPlace $out/activate \ --subst-var-by GENERATION_DIR $out