nixpkgs/pkgs/applications/networking/spideroak/default.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

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
sha256 = "6d6ca2b383bcc81af1217c696eb77864a2b6db7428f4b5bde5b5913ce705eec5";
2014-07-18 21:21:48 +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
];
version = "7.5.0";
2014-07-18 21:21:48 +01:00
in stdenv.mkDerivation {
2019-08-13 22:52:01 +01:00
pname = "spideroak";
inherit version;
2014-07-18 21:21:48 +01:00
src = fetchurl {
name = "SpiderOakONE-${version}-slack_tar_x64.tgz";
url = "https://spideroak.com/release/spideroak/slack_tar_x64";
2014-07-18 21:21:48 +01:00
inherit sha256;
};
sourceRoot = ".";
unpackCmd = "tar -xzf $curSrc";
installPhase = ''
mkdir "$out"
2014-07-18 21:21:48 +01:00
cp -r "./"* "$out"
mkdir "$out/bin"
rm "$out/usr/bin/SpiderOakONE"
rmdir $out/usr/bin || true
mv $out/usr/share $out/
2014-07-18 21:21:48 +01:00
rm -f $out/opt/SpiderOakONE/lib/libz*
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 \
"$out/opt/SpiderOakONE/lib/SpiderOakONE"
2014-07-18 21:21:48 +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
sed -i 's/^Exec=.*/Exec=spideroak/' $out/share/applications/SpiderOakONE.desktop
2014-07-18 21:21:48 +01:00
'';
nativeBuildInputs = [ patchelf makeWrapper ];
2014-07-18 21:21:48 +01:00
meta = {
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;
};
}