about summary refs log tree commit diff
path: root/pkgs/applications/networking/bittorrentsync/1.4.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/bittorrentsync/1.4.x.nix')
-rw-r--r--pkgs/applications/networking/bittorrentsync/1.4.x.nix47
1 files changed, 7 insertions, 40 deletions
diff --git a/pkgs/applications/networking/bittorrentsync/1.4.x.nix b/pkgs/applications/networking/bittorrentsync/1.4.x.nix
index 1b439daa853e4..9d57cdaaf20d6 100644
--- a/pkgs/applications/networking/bittorrentsync/1.4.x.nix
+++ b/pkgs/applications/networking/bittorrentsync/1.4.x.nix
@@ -1,42 +1,9 @@
-{ stdenv, fetchurl, patchelf }:
+{ 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 "1b9f6qxpvyrzf23l71hw42qyg4i27by3hs91sm34drm24z7m7fpd"
-    else if stdenv.system == "i686-linux" then "0caqwaxd6i8cap35kpzkwy5dknk7iaxf5fbfjy46cbwylgcpsc2x"
-    else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
-
-  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.libc ];
-in
-stdenv.mkDerivation rec {
-  name = "btsync-${version}";
-  version = "1.4.110";
-
-  src  = fetchurl {
-    url  = "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz";
-    inherit sha256;
-  };
-
-  dontStrip   = true; # Don't strip, otherwise patching the rpaths breaks
-  sourceRoot  = ".";
-  buildInputs = [ patchelf ];
-
-  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    = "http://www.bittorrent.com/sync";
-    license     = stdenv.lib.licenses.unfreeRedistributable;
-    platforms   = stdenv.lib.platforms.linux;
-    maintainers = with stdenv.lib.maintainers; [ iElectric thoughtpolice ];
+import ./generic.nix (args // {
+  version = "1.4.111";
+  sha256s = {
+    "x86_64-linux" = "0bw3ds3ndcnkry5mpv645z2bfi5z387bh0f7b35blxq1yv93r83f";
+    "i686-linux"   = "1qwaj7l7nsd4afx7ksb4b1c22mki9qa40803v9x1a8bhbdfhkczk";
   };
-}
+})