about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/sync/rclone/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/sync/rclone/default.nix29
1 files changed, 15 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix b/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix
index b2ad47e9b4be..bd68531db190 100644
--- a/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix
+++ b/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix
@@ -1,17 +1,17 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, buildPackages, installShellFiles }:
+{ stdenv, buildGoModule, fetchFromGitHub, buildPackages, installShellFiles }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "rclone";
-  version = "1.52.1";
+  version = "1.53.1";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "1v91c3wydpixi0p0afclp4baxchigy3czlm1mq9hn6cw973z6spf";
+    sha256 = "1yi6n5ip680ydqhz8fnd0igr8dy7zzhpx37mdgahsfac7cwf6k0q";
   };
 
-  goPackagePath = "github.com/rclone/rclone";
+  vendorSha256 = "1l4iz31k1pylvf0zrp4nhxna70s1ma4981x6q1s3dhszjxil5c88";
 
   subPackages = [ "." ];
 
@@ -19,6 +19,8 @@ buildGoPackage rec {
 
   nativeBuildInputs = [ installShellFiles ];
 
+  buildFlagsArray = [ "-ldflags=-s -w -X github.com/rclone/rclone/fs.Version=${version}" ];
+
   postInstall =
     let
       rcloneBin =
@@ -26,19 +28,18 @@ buildGoPackage rec {
         then "$out"
         else stdenv.lib.getBin buildPackages.rclone;
     in
-      ''
-        installManPage $src/rclone.1
-        for shell in bash zsh fish; do
-          ${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell
-          installShellCompletion rclone.$shell
-        done
-      '';
+    ''
+      installManPage rclone.1
+      for shell in bash zsh fish; do
+        ${rcloneBin}/bin/rclone genautocomplete $shell rclone.$shell
+        installShellCompletion rclone.$shell
+      done
+    '';
 
   meta = with stdenv.lib; {
     description = "Command line program to sync files and directories to and from major cloud storage";
     homepage = "https://rclone.org";
     license = licenses.mit;
-    maintainers = with maintainers; [ danielfullmer ];
-    platforms = platforms.all;
+    maintainers = with maintainers; [ danielfullmer marsam ];
   };
 }