hubstaff: 1.2.15 → 1.3.0

+14 -12
+14 -12
pkgs/applications/misc/hubstaff/default.nix
··· 1 - { stdenv, fetchurl, unzip, makeWrapper, libX11, zlib, libSM, libICE, libXext 2 - , freetype, libXrender, fontconfig, libXft, libXinerama, libnotify, glib 3 - , gtk3, libappindicator-gtk3, curl }: 1 + { stdenv, fetchurl, unzip, makeWrapper, libX11, zlib, libSM, libICE 2 + , libXext , freetype, libXrender, fontconfig, libXft, libXinerama 3 + , libXfixes, libXScrnSaver, libnotify, glib , gtk3, libappindicator-gtk3 4 + , curl }: 4 5 5 6 let 6 7 7 - version = "1.2.15-590e8bc"; 8 + version = "1.3.0-9b2ba62"; 8 9 9 10 rpath = stdenv.lib.makeLibraryPath 10 11 [ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft 11 12 libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3 12 - curl ]; 13 + curl libXfixes libXScrnSaver ]; 13 14 14 15 in 15 16 ··· 18 19 19 20 src = fetchurl { 20 21 url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh"; 21 - sha256 = "142q8xvwn5gdmpv5x25py2lindr74jqncf8vvw22yb9nj5aqqsi6"; 22 + sha256 = "1dxzyl3yxbfmbw1pv8k3vhqzbmyyf16zkgrhzsbm866nmbgnqk1s"; 22 23 }; 23 24 24 25 nativeBuildInputs = [ unzip makeWrapper ]; 25 26 26 27 unpackCmd = '' 27 28 # MojoSetups have a ZIP file at the end. ZIP’s magic string is 28 - # most often PK\x03\x04. This *should* work for future updates, 29 + # most often PK\x03\x04. This has worked for all past updates, 29 30 # but feel free to come up with something more reasonable. 30 31 dataZipOffset=$(grep --max-count=1 --byte-offset --only-matching --text ''$'PK\x03\x04' $curSrc | cut -d: -f1) 31 32 dd bs=$dataZipOffset skip=1 if=$curSrc of=data.zip 2>/dev/null ··· 38 39 installPhase = '' 39 40 # TODO: handle 32-bit arch? 40 41 rm -r x86 42 + rm -r x86_64/lib64 41 43 42 44 opt=$out/opt/hubstaff 43 45 mkdir -p $out/bin $opt 44 46 cp -r . $opt/ 45 47 46 - prog=$opt/x86_64/HubstaffClient.bin.x86_64 48 + for f in "$opt/x86_64/"*.bin.x86_64 ; do 49 + patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $f 50 + wrapProgram $f --prefix LD_LIBRARY_PATH : ${rpath} 51 + done 47 52 48 - patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $prog 49 - wrapProgram $prog --prefix LD_LIBRARY_PATH : ${rpath} 50 - 51 - ln -s $prog $out/bin/HubstaffClient 53 + ln -s $opt/x86_64/HubstaffClient.bin.x86_64 $out/bin/HubstaffClient 52 54 53 55 # Why is this needed? SEGV otherwise. 54 56 ln -s $opt/data/resources $opt/x86_64/resources