2020-09-02 21:21:21 +00:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, buildPackages, installShellFiles }:
|
2016-06-30 04:47:43 +00:00
|
|
|
|
2020-09-02 21:21:21 +00:00
|
|
|
buildGoModule rec {
|
2019-02-23 00:35:27 +00:00
|
|
|
pname = "rclone";
|
2020-10-25 04:20:00 +00:00
|
|
|
version = "1.53.2";
|
2016-06-30 04:47:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-08-27 11:35:54 +00:00
|
|
|
owner = pname;
|
2019-04-14 02:08:10 +00:00
|
|
|
repo = pname;
|
2016-06-30 04:47:43 +00:00
|
|
|
rev = "v${version}";
|
2020-10-25 04:20:00 +00:00
|
|
|
sha256 = "0ns55b6s4zdw94jlialps3knclghj9xqx84ff8hyrl9ksq02kd3w";
|
2016-06-30 04:47:43 +00:00
|
|
|
};
|
|
|
|
|
2020-09-02 21:21:21 +00:00
|
|
|
vendorSha256 = "1l4iz31k1pylvf0zrp4nhxna70s1ma4981x6q1s3dhszjxil5c88";
|
2019-04-14 02:08:10 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
2017-07-23 01:29:21 +00:00
|
|
|
|
2020-04-28 01:50:57 +00:00
|
|
|
outputs = [ "out" "man" ];
|
2019-02-23 00:35:27 +00:00
|
|
|
|
2020-04-26 03:16:53 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-09-02 21:21:21 +00:00
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X github.com/rclone/rclone/fs.Version=${version}" ];
|
|
|
|
|
2020-02-01 11:27:00 +00:00
|
|
|
postInstall =
|
|
|
|
let
|
|
|
|
rcloneBin =
|
|
|
|
if stdenv.buildPlatform == stdenv.hostPlatform
|
2020-04-28 01:50:57 +00:00
|
|
|
then "$out"
|
2020-02-01 11:27:00 +00:00
|
|
|
else stdenv.lib.getBin buildPackages.rclone;
|
|
|
|
in
|
2020-09-02 21:21:21 +00:00
|
|
|
''
|
|
|
|
installManPage rclone.1
|
|
|
|
for shell in bash zsh fish; do
|
|
|
|
${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell
|
|
|
|
installShellCompletion rclone.$shell
|
|
|
|
done
|
|
|
|
'';
|
2017-07-23 01:29:21 +00:00
|
|
|
|
2017-01-02 22:43:07 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-06-30 04:47:43 +00:00
|
|
|
description = "Command line program to sync files and directories to and from major cloud storage";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://rclone.org";
|
2017-01-02 22:43:07 +00:00
|
|
|
license = licenses.mit;
|
2020-08-08 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ danielfullmer marsam ];
|
2016-06-30 04:47:43 +00:00
|
|
|
};
|
|
|
|
}
|