diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2020-04-27 10:03:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 10:03:52 +0100 |
commit | a90356e08a994476a1a8fe35cbe41c9f99014fc8 (patch) | |
tree | 859b4600ad5eca205f61297364277779e06be6c9 /pkgs/applications/networking/sync | |
parent | a6b85b96d4c5d8101c49661594dc5ad4eaa07656 (diff) | |
parent | 454f8ef82aa776c8fd6a3da8bcf72211c3f6cfa9 (diff) |
Merge pull request #86035 from zowoq/go-fixes
Diffstat (limited to 'pkgs/applications/networking/sync')
-rw-r--r-- | pkgs/applications/networking/sync/rclone/default.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index 2f484467450c..57925a3292d8 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, buildPackages }: +{ stdenv, buildGoPackage, fetchFromGitHub, buildPackages, installShellFiles }: buildGoPackage rec { pname = "rclone"; @@ -17,6 +17,8 @@ buildGoPackage rec { outputs = [ "bin" "out" "man" ]; + nativeBuildInputs = [ installShellFiles ]; + postInstall = let rcloneBin = @@ -25,10 +27,11 @@ buildGoPackage rec { else stdenv.lib.getBin buildPackages.rclone; in '' - install -D -m644 $src/rclone.1 $man/share/man/man1/rclone.1 - mkdir -p $bin/share/zsh/site-functions $bin/share/bash-completion/completions/ - ${rcloneBin}/bin/rclone genautocomplete zsh $bin/share/zsh/site-functions/_rclone - ${rcloneBin}/bin/rclone genautocomplete bash $bin/share/bash-completion/completions/rclone.bash + installManPage $src/rclone.1 + for shell in bash zsh; do + ${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell + installShellCompletion rclone.$shell + done ''; meta = with stdenv.lib; { |