2017-09-16 18:07:38 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, patchelf
|
|
|
|
, fontconfig, freetype, glib, libICE, libSM
|
|
|
|
, libX11, libXext, libXrender, zlib
|
2014-07-18 21:21:48 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2018-08-20 20:11:29 +01:00
|
|
|
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "x64"
|
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then "x86"
|
|
|
|
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
|
2014-07-18 21:21:48 +01:00
|
|
|
|
2018-08-20 20:11:29 +01:00
|
|
|
interpreter = if stdenv.hostPlatform.system == "x86_64-linux" then "ld-linux-x86-64.so.2"
|
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then "ld-linux.so.2"
|
|
|
|
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
|
2014-07-18 21:21:48 +01:00
|
|
|
|
2018-08-20 20:11:29 +01:00
|
|
|
sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "a88e5a8fe4a565ac500668bd53cf5784752d7c9253304ddce39ee7b01d078533"
|
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then "668f3b83a974a3877d16c8743c233a427ea0a44ab84b7f9aec19a2995db66c16"
|
|
|
|
else throw "Spideroak client for: ${stdenv.hostPlatform.system} not supported!";
|
2014-07-18 21:21:48 +01:00
|
|
|
|
2016-04-13 13:53:51 +01:00
|
|
|
ldpath = stdenv.lib.makeLibraryPath [
|
2017-09-16 18:07:38 +01:00
|
|
|
fontconfig freetype glib libICE libSM
|
|
|
|
libX11 libXext libXrender zlib
|
2014-07-18 21:21:48 +01:00
|
|
|
];
|
|
|
|
|
2018-03-26 15:57:54 +01:00
|
|
|
version = "7.1.0";
|
2014-07-18 21:21:48 +01:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "spideroak-${version}";
|
2015-10-12 08:24:22 +01:00
|
|
|
|
2014-07-18 21:21:48 +01:00
|
|
|
src = fetchurl {
|
2018-03-12 02:56:27 +00:00
|
|
|
name = "SpiderOakONE-${version}-slack_tar_${arch}.tgz";
|
|
|
|
url = "https://spideroak.com/release/spideroak/slack_tar_${arch}";
|
2014-07-18 21:21:48 +01:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
|
|
|
unpackCmd = "tar -xzf $curSrc";
|
|
|
|
|
|
|
|
installPhase = ''
|
2015-10-12 08:24:22 +01:00
|
|
|
mkdir "$out"
|
2014-07-18 21:21:48 +01:00
|
|
|
cp -r "./"* "$out"
|
2015-10-12 08:24:22 +01:00
|
|
|
mkdir "$out/bin"
|
|
|
|
rm "$out/usr/bin/SpiderOakONE"
|
2017-02-07 18:07:48 +00:00
|
|
|
rmdir $out/usr/bin || true
|
|
|
|
mv $out/usr/share $out/
|
2014-07-18 21:21:48 +01:00
|
|
|
|
2017-09-16 18:07:13 +01:00
|
|
|
rm -f $out/opt/SpiderOakONE/lib/libz*
|
|
|
|
|
2015-04-26 18:54:51 +01:00
|
|
|
patchelf --set-interpreter ${stdenv.glibc.out}/lib/${interpreter} \
|
2015-10-12 08:24:22 +01:00
|
|
|
"$out/opt/SpiderOakONE/lib/SpiderOakONE"
|
2014-07-18 21:21:48 +01:00
|
|
|
|
2015-10-12 08:24:22 +01:00
|
|
|
RPATH=$out/opt/SpiderOakONE/lib:${ldpath}
|
|
|
|
makeWrapper $out/opt/SpiderOakONE/lib/SpiderOakONE $out/bin/spideroak --set LD_LIBRARY_PATH $RPATH \
|
|
|
|
--set QT_PLUGIN_PATH $out/opt/SpiderOakONE/lib/plugins/ \
|
2014-07-18 21:21:48 +01:00
|
|
|
--set SpiderOak_EXEC_SCRIPT $out/bin/spideroak
|
2017-02-07 18:07:48 +00:00
|
|
|
|
|
|
|
sed -i 's/^Exec=.*/Exec=spideroak/' $out/share/applications/SpiderOakONE.desktop
|
2014-07-18 21:21:48 +01:00
|
|
|
'';
|
|
|
|
|
2018-09-27 22:38:10 +01:00
|
|
|
nativeBuildInputs = [ patchelf makeWrapper ];
|
2014-07-18 21:21:48 +01:00
|
|
|
|
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://spideroak.com;
|
2014-07-18 21:21:48 +01:00
|
|
|
description = "Secure online backup and sychronization";
|
|
|
|
license = stdenv.lib.licenses.unfree;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ amorsillo ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|