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:
Robert Helgesson 2019-08-15 23:23:43 +02:00
parent 5c94538c7d
commit fcdab6a62d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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
''