2013-04-27 18:43:43 +02:00
|
|
|
{ stdenv, fetchurl, patchelf }:
|
|
|
|
|
|
|
|
# this package contains the daemon version of bittorrent sync
|
|
|
|
# it's unfortunately closed source.
|
|
|
|
|
|
|
|
let
|
|
|
|
# TODO: arm, ppc, osx
|
|
|
|
|
|
|
|
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!";
|
|
|
|
|
|
|
|
interpreter = if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
|
|
|
|
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
|
|
|
|
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
|
|
|
|
|
2013-11-30 19:42:27 +01:00
|
|
|
version = "1.2.82";
|
|
|
|
sha256 = if stdenv.system == "x86_64-linux" then "0cqrscav57xwz7rag6wy06xw6z7ca97xailprgg6jdjv4pnc91ra"
|
|
|
|
else if stdenv.system == "i686-linux" then "1b9rnfk0wkhj1zybvfqwgd9dcqnxwdnp7m0vf6lhrgi75cydj7is"
|
2013-04-27 18:43:43 +02:00
|
|
|
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "btsync-bin-${version}";
|
|
|
|
src = fetchurl {
|
2013-05-11 09:31:04 +02:00
|
|
|
url = "http://syncapp.bittorrent.com/${version}/btsync_${arch}-${version}.tar.gz";
|
2013-04-27 18:43:43 +02:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ensureDir "$out/bin/"
|
|
|
|
cp -r "btsync" "$out/bin/"
|
|
|
|
|
|
|
|
patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
|
|
|
|
"$out/bin/btsync"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ patchelf ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://labs.bittorrent.com/experiments/sync.html";
|
2013-10-05 16:22:46 +02:00
|
|
|
description = "Automatically sync files via secure, distributed technology";
|
2013-05-13 00:04:59 +02:00
|
|
|
license = stdenv.lib.licenses.unfree;
|
2013-04-27 18:43:43 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.iElectric ];
|
|
|
|
};
|
|
|
|
}
|