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:
parent
634a909ddc
commit
176e82ee1c
1 changed files with 5 additions and 1 deletions
|
@ -6,6 +6,7 @@ runCommand
|
|||
propagatedBuildInputs = [ home-manager ];
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
shellHookOnly = true;
|
||||
shellHook = ''
|
||||
confFile="''${XDG_CONFIG_HOME:-$HOME/.config}/nixpkgs/home.nix"
|
||||
|
||||
|
@ -53,4 +54,7 @@ runCommand
|
|||
fi
|
||||
'';
|
||||
}
|
||||
""
|
||||
''
|
||||
echo This derivation is not buildable, instead run it using nix-shell.
|
||||
exit 1
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue