mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
rclone: use installShellFiles
This commit is contained in:
parent
954eab8ea9
commit
0bead921ca
1 changed files with 8 additions and 5 deletions
|
@ -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; {
|
||||
|
|
Loading…
Reference in a new issue