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.
This commit is contained in:
parent
5c94538c7d
commit
fcdab6a62d
|
@ -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