blob: 1a6ab883c4ae6f40a3ec680c02da8da0056aeda3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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.out}/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;
};
}
|