1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 06:59:45 +01:00

install: restrict to nix-shell

This commit adds a "build" command to the install derivation that
tells the user that `nix-shell` should be used.

A derivation attribute `shellHookOnly = true` is also added with the
intent to indicate that the shell hook is the entire point of the
derivation.

(cherry picked from commit fcdab6a62d)
This commit is contained in:
Robert Helgesson 2019-08-15 23:23:43 +02:00
parent 634a909ddc
commit 176e82ee1c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -6,6 +6,7 @@ runCommand
propagatedBuildInputs = [ home-manager ]; propagatedBuildInputs = [ home-manager ];
preferLocalBuild = true; preferLocalBuild = true;
allowSubstitutes = false; allowSubstitutes = false;
shellHookOnly = true;
shellHook = '' shellHook = ''
confFile="''${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix" confFile="''${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix"
@ -53,4 +54,7 @@ runCommand
fi fi
''; '';
} }
"" ''
echo This derivation is not buildable, instead run it using nix-shell.
exit 1
''