diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/sync')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/sync/onedrive/default.nix | 28 | ||||
-rw-r--r-- | nixpkgs/pkgs/applications/networking/sync/rclone/default.nix | 29 |
2 files changed, 37 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/applications/networking/sync/onedrive/default.nix b/nixpkgs/pkgs/applications/networking/sync/onedrive/default.nix index 636761d2aaf..be255a6c146 100644 --- a/nixpkgs/pkgs/applications/networking/sync/onedrive/default.nix +++ b/nixpkgs/pkgs/applications/networking/sync/onedrive/default.nix @@ -1,21 +1,37 @@ -{ stdenv, fetchFromGitHub, dmd, pkgconfig, curl, sqlite, libnotify }: +{ stdenv, lib, fetchFromGitHub, autoreconfHook, ldc, installShellFiles, pkgconfig +, curl, sqlite, libnotify +, withSystemd ? stdenv.isLinux, systemd ? null }: stdenv.mkDerivation rec { pname = "onedrive"; - version = "2.3.13"; + version = "2.4.2"; src = fetchFromGitHub { owner = "abraunegg"; repo = pname; rev = "v${version}"; - sha256 = "0bcsrfh1g7bdlcp0zjn6np88qzpn5frv61lzxz9b2ayxf7wyybvi"; + sha256 = "10s33p1xzq9c5n1bxv9n7n31afxgx9i6c17w0xgxdrma75micm3a"; }; - nativeBuildInputs = [ dmd pkgconfig ]; + nativeBuildInputs = [ autoreconfHook ldc installShellFiles pkgconfig ]; - buildInputs = [ curl sqlite libnotify ]; + buildInputs = [ + curl sqlite libnotify + ] ++ lib.optional withSystemd systemd; - configureFlags = [ "--enable-notifications" ]; + configureFlags = [ + "--enable-notifications" + ] ++ lib.optionals withSystemd [ + "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" + "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user" + ]; + + # we could also pass --enable-completions to configure but we would then have to + # figure out the paths manually and pass those along. + postInstall = '' + installShellCompletion --bash --name ${pname} contrib/completions/complete.bash + installShellCompletion --zsh --name _${pname} contrib/completions/complete.zsh + ''; meta = with stdenv.lib; { description = "A complete tool to interact with OneDrive on Linux"; diff --git a/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix b/nixpkgs/pkgs/applications/networking/sync/rclone/default.nix index 6489c69b161..bd68531db19 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.0"; + version = "1.53.1"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "0v0f3pv8qgk8ggrhm4p9brra1ppj53b51jhgh5xi0rhgpxss0d6r"; + 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 ]; }; } |