at 22.05-pre 57 lines 2.1 kB view raw
1{ stdenv, lib, fetchurl, glib, nss, nspr, gconf, fontconfig, freetype 2, pango , cairo, libX11 , libXi, libXcursor, libXext, libXfixes 3, libXrender, libXcomposite , alsa-lib, libXdamage, libXtst, libXrandr 4, expat, libcap, systemd , dbus, gtk2 , gdk-pixbuf, libnotify 5}: 6 7let 8 arch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd" 9 else if stdenv.hostPlatform.system == "i686-linux" then "i386" 10 else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; 11 12 sha256 = if stdenv.hostPlatform.system == "x86_64-linux" then "1j3g467g7ar86hpnh6q9mf7mh2h4ia94mwhk1283zh739s2g53q2" 13 else if stdenv.hostPlatform.system == "i686-linux" then "02j9hg9b1jlv25q1sjfhv8d46mii33f94dj0ccn83z9z18q4y2cm" 14 else throw "Encryptr for ${stdenv.hostPlatform.system} not supported!"; 15 16in stdenv.mkDerivation rec { 17 pname = "encryptr"; 18 version = "2.0.0"; 19 20 src = fetchurl { 21 url = "https://spideroak.com/dist/encryptr/signed/linux/targz/encryptr-${version}_${arch}.tar.gz"; 22 inherit sha256; 23 }; 24 25 dontBuild = true; 26 27 rpath = lib.makeLibraryPath [ 28 glib nss nspr gconf fontconfig freetype pango cairo libX11 libXi 29 libXcursor libXext libXfixes libXrender libXcomposite alsa-lib 30 libXdamage libXtst libXrandr expat libcap dbus gtk2 gdk-pixbuf 31 libnotify stdenv.cc.cc 32 ]; 33 34 installPhase = '' 35 mkdir -pv $out/bin $out/lib 36 cp -v {encryptr-bin,icudtl.dat,nw.pak} $out/bin 37 mv -v $out/bin/encryptr{-bin,} 38 cp -v lib* $out/lib 39 ln -sv ${lib.getLib systemd}/lib/libudev.so.1 $out/lib/libudev.so.0 40 41 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 42 --set-rpath $out/lib:${rpath} \ 43 $out/bin/encryptr 44 ''; 45 46 # If stripping, node-webkit does not find 47 # its application and shows a generic page 48 dontStrip = true; 49 50 meta = with lib; { 51 homepage = "https://spideroak.com/solutions/encryptr"; 52 description = "Free, private and secure password management tool and e-wallet"; 53 license = licenses.unfree; 54 maintainers = with maintainers; [ guillaumekoenig ]; 55 platforms = platforms.linux; 56 }; 57}