mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 05:57:28 +00:00
rclone: install completions
This commit is contained in:
parent
5c992241ed
commit
08dc02a07b
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
{ stdenv, buildGoPackage, fetchFromGitHub, buildPackages }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "rclone";
|
pname = "rclone";
|
||||||
@ -17,9 +17,19 @@ buildGoPackage rec {
|
|||||||
|
|
||||||
outputs = [ "bin" "out" "man" ];
|
outputs = [ "bin" "out" "man" ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall =
|
||||||
install -D -m644 $src/rclone.1 $man/share/man/man1/rclone.1
|
let
|
||||||
'';
|
rcloneBin =
|
||||||
|
if stdenv.buildPlatform == stdenv.hostPlatform
|
||||||
|
then "$bin"
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Command line program to sync files and directories to and from major cloud storage";
|
description = "Command line program to sync files and directories to and from major cloud storage";
|
||||||
|
Loading…
Reference in New Issue
Block a user