about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2014-07-26 02:19:51 +0200
committerJaka Hudoklin <jakahudoklin@gmail.com>2014-07-26 02:19:51 +0200
commit7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121 (patch)
tree33172e917326457bb70208799d2946d9d1ffa12e /pkgs
parent598d0460cd7635fdfe0a23fce6365b7ddfc72e43 (diff)
parent7f96fff12b864478607fc8fad5e8741d7a15d43a (diff)
downloadnixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.tar
nixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.tar.gz
nixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.tar.bz2
nixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.tar.lz
nixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.tar.xz
nixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.tar.zst
nixlib-7f467aeeb2f5d4c5e1972a3b2ab01d5f8b303121.zip
Merge pull request #3315 from fignuts/master
Add SpiderOak secure backup service.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/spideroak/default.nix62
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/applications/networking/spideroak/default.nix b/pkgs/applications/networking/spideroak/default.nix
new file mode 100644
index 000000000000..403630e25e55
--- /dev/null
+++ b/pkgs/applications/networking/spideroak/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchurl, makeWrapper, glib
+, fontconfig, patchelf, libXext, libX11
+, freetype, libXrender
+}:
+
+let
+  arch = if stdenv.system == "x86_64-linux" then "x86_64"
+    else if stdenv.system == "i686-linux" then "i386"
+    else throw "Spideroak client 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 "Spideroak client for: ${stdenv.system} not supported!";
+
+  sha256 = if stdenv.system == "x86_64-linux" then "0ax5ij3fwq3q9agf7qkw2zg53fcd82llg734pq3swzpn3z1ajs38"
+    else if stdenv.system == "i686-linux" then "18hvgx8bvd2khnqfn434gd4mflv0w5y8kvim72rvya2kwxsyf3i1"
+    else throw "Spideroak client for: ${stdenv.system} not supported!";
+
+  ldpath = stdenv.lib.makeSearchPath "lib" [
+    glib fontconfig libXext libX11 freetype libXrender 
+  ];
+
+  version = "5.1.6";
+
+in stdenv.mkDerivation {
+  name = "spideroak-${version}";
+  
+  src = fetchurl {
+    name = "spideroak-${version}-${arch}";
+    url = "https://spideroak.com/getbuild?platform=slackware&arch=${arch}&version=${version}";
+    inherit sha256;
+  };
+
+  sourceRoot = ".";
+
+  unpackCmd = "tar -xzf $curSrc";
+
+  installPhase = ''
+    ensureDir "$out"
+    cp -r "./"* "$out"
+    ensureDir "$out/bin"
+    rm "$out/usr/bin/SpiderOak"
+
+    patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
+      "$out/opt/SpiderOak/lib/SpiderOak"
+
+    RPATH=$out/opt/SpiderOak/lib:${ldpath}
+    makeWrapper $out/opt/SpiderOak/lib/SpiderOak $out/bin/spideroak --set LD_LIBRARY_PATH $RPATH \
+      --set QT_PLUGIN_PATH $out/opt/SpiderOak/lib/plugins/ \
+      --set SpiderOak_EXEC_SCRIPT $out/bin/spideroak
+  '';
+
+  buildInputs = [ patchelf makeWrapper ];
+
+  meta = {
+    homepage = "https://spideroak.com";
+    description = "Secure online backup and sychronization";
+    license = stdenv.lib.licenses.unfree;
+    maintainers = with stdenv.lib.maintainers; [ amorsillo ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1129bf644efc..28a28d869445 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9521,6 +9521,8 @@ let
 
   slrn = callPackage ../applications/networking/newsreaders/slrn { };
 
+  spideroak = callPackage ../applications/networking/spideroak { };
+
   ssvnc = callPackage ../applications/networking/remote/ssvnc { };
 
   st = callPackage ../applications/misc/st {