diff options
author | Lily Ballard <lily@sb.org> | 2019-07-20 19:53:19 -0700 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2019-09-04 23:19:17 +0200 |
commit | 43dade238f39fc3edb6c6be6d318e4f7f990f971 (patch) | |
tree | e3ffa6d22b5a7f0a847eb14fd1e0799b22beb665 /pkgs/build-support/install-shell-files/default.nix | |
parent | 37e333af9a18814537b872745d9b1c580c1b1a9d (diff) | |
download | nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.tar nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.tar.gz nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.tar.bz2 nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.tar.lz nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.tar.xz nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.tar.zst nixpkgs-43dade238f39fc3edb6c6be6d318e4f7f990f971.zip |
installShellFiles: init (#65211)
This is a new package that provides a shell hook to make it easy to declare manpages and shell completions in a manner that doesn't require remembering where to actually install them. Basic usage looks like { stdenv, installShellFiles, ... }: stdenv.mkDerivation { # ... nativeBuildInputs = [ installShellFiles ]; postInstall = '' installManPage doc/foobar.1 installShellCompletion --bash share/completions/foobar.bash installShellCompletion --fish share/completions/foobar.fish installShellCompletion --zsh share/completions/_foobar ''; # ... } See source comments for more details on the functions.
Diffstat (limited to 'pkgs/build-support/install-shell-files/default.nix')
-rw-r--r-- | pkgs/build-support/install-shell-files/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/install-shell-files/default.nix b/pkgs/build-support/install-shell-files/default.nix new file mode 100644 index 00000000000..e1f2e24dd87 --- /dev/null +++ b/pkgs/build-support/install-shell-files/default.nix @@ -0,0 +1,4 @@ +{ makeSetupHook }: + +# See the header comment in ../setup-hooks/install-shell-files.sh for example usage. +makeSetupHook { name = "install-shell-files"; } ../setup-hooks/install-shell-files.sh |