about summary refs log tree commit diff
path: root/pkgs/applications/networking/bittorrentsync/2.0.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/bittorrentsync/2.0.x.nix')
-rw-r--r--pkgs/applications/networking/bittorrentsync/2.0.x.nix46
1 files changed, 7 insertions, 39 deletions
diff --git a/pkgs/applications/networking/bittorrentsync/2.0.x.nix b/pkgs/applications/networking/bittorrentsync/2.0.x.nix
index ee4d3a436a577..f8ba6a5c5f6d7 100644
--- a/pkgs/applications/networking/bittorrentsync/2.0.x.nix
+++ b/pkgs/applications/networking/bittorrentsync/2.0.x.nix
@@ -1,41 +1,9 @@
-{ stdenv, fetchurl }:
+{ stdenv, fetchurl, ... } @ args:
 
-let
-  arch = if stdenv.system == "x86_64-linux" then "x64"
-    else if stdenv.system == "i686-linux" then "i386"
-    else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
-
-  sha256 = if stdenv.system == "x86_64-linux" then "01yrligi61gxcixh7z6gi427ga0sx97wnmkv08p9ykd4b90hvj7s"
-    else if stdenv.system == "i686-linux" then     "119dll7f4w7h8nrrafmrj1d0lddjzwg5l8hnf74xdjg6g7rhrmd7"
-    else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
-
-  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
-in
-stdenv.mkDerivation rec {
-  name = "btsync-${version}";
-  version = "2.3.6";
-
-  src  = fetchurl {
-    url  = "https://download-cdn.getsync.com/${version}/linux-${arch}/BitTorrent-Sync_${arch}.tar.gz";
-    inherit sha256;
-  };
-
-  dontStrip   = true; # Don't strip, otherwise patching the rpaths breaks
-  sourceRoot  = ".";
-
-  installPhase = ''
-    mkdir -p "$out/bin/"
-    cp -r "btsync" "$out/bin/"
-
-    patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath ${libPath} "$out/bin/btsync"
-  '';
-
-  meta = {
-    description = "Automatically sync files via secure, distributed technology";
-    homepage    = https://www.getsync.com/;
-    license     = stdenv.lib.licenses.unfreeRedistributable;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ iElectric thoughtpolice cwoac ];
+import ./generic.nix (args // {
+  version = "2.3.7";
+  sha256s = {
+    "x86_64-linux" = "1hnw6bv60xrnc733gm1ilywc0y93k2g6bmwgnww9qk7ivbvi6pd1";
+    "i686-linux"   = "0hj8nbq6mava15m1hxaqq371fqk0whdx5iqsbnppyci0jjnr4qv1";
   };
-}
+})