Merge pull request #34337 from michalrus/hubstaff
hubstaff: 1.2.15 → 1.3.0
This commit is contained in:
commit
b611180efd
@ -1,15 +1,16 @@
|
|||||||
{ stdenv, fetchurl, unzip, makeWrapper, libX11, zlib, libSM, libICE, libXext
|
{ stdenv, fetchurl, unzip, makeWrapper, libX11, zlib, libSM, libICE
|
||||||
, freetype, libXrender, fontconfig, libXft, libXinerama, libnotify, glib
|
, libXext , freetype, libXrender, fontconfig, libXft, libXinerama
|
||||||
, gtk3, libappindicator-gtk3, curl }:
|
, libXfixes, libXScrnSaver, libnotify, glib , gtk3, libappindicator-gtk3
|
||||||
|
, curl }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
version = "1.2.15-590e8bc";
|
version = "1.3.0-9b2ba62";
|
||||||
|
|
||||||
rpath = stdenv.lib.makeLibraryPath
|
rpath = stdenv.lib.makeLibraryPath
|
||||||
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
|
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
|
||||||
libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3
|
libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3
|
||||||
curl ];
|
curl libXfixes libXScrnSaver ];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -18,14 +19,14 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh";
|
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh";
|
||||||
sha256 = "142q8xvwn5gdmpv5x25py2lindr74jqncf8vvw22yb9nj5aqqsi6";
|
sha256 = "1dxzyl3yxbfmbw1pv8k3vhqzbmyyf16zkgrhzsbm866nmbgnqk1s";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ unzip makeWrapper ];
|
nativeBuildInputs = [ unzip makeWrapper ];
|
||||||
|
|
||||||
unpackCmd = ''
|
unpackCmd = ''
|
||||||
# MojoSetups have a ZIP file at the end. ZIP’s magic string is
|
# MojoSetups have a ZIP file at the end. ZIP’s magic string is
|
||||||
# most often PK\x03\x04. This *should* work for future updates,
|
# most often PK\x03\x04. This has worked for all past updates,
|
||||||
# but feel free to come up with something more reasonable.
|
# but feel free to come up with something more reasonable.
|
||||||
dataZipOffset=$(grep --max-count=1 --byte-offset --only-matching --text ''$'PK\x03\x04' $curSrc | cut -d: -f1)
|
dataZipOffset=$(grep --max-count=1 --byte-offset --only-matching --text ''$'PK\x03\x04' $curSrc | cut -d: -f1)
|
||||||
dd bs=$dataZipOffset skip=1 if=$curSrc of=data.zip 2>/dev/null
|
dd bs=$dataZipOffset skip=1 if=$curSrc of=data.zip 2>/dev/null
|
||||||
@ -38,17 +39,18 @@ stdenv.mkDerivation {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
# TODO: handle 32-bit arch?
|
# TODO: handle 32-bit arch?
|
||||||
rm -r x86
|
rm -r x86
|
||||||
|
rm -r x86_64/lib64
|
||||||
|
|
||||||
opt=$out/opt/hubstaff
|
opt=$out/opt/hubstaff
|
||||||
mkdir -p $out/bin $opt
|
mkdir -p $out/bin $opt
|
||||||
cp -r . $opt/
|
cp -r . $opt/
|
||||||
|
|
||||||
prog=$opt/x86_64/HubstaffClient.bin.x86_64
|
for f in "$opt/x86_64/"*.bin.x86_64 ; do
|
||||||
|
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $f
|
||||||
|
wrapProgram $f --prefix LD_LIBRARY_PATH : ${rpath}
|
||||||
|
done
|
||||||
|
|
||||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) $prog
|
ln -s $opt/x86_64/HubstaffClient.bin.x86_64 $out/bin/HubstaffClient
|
||||||
wrapProgram $prog --prefix LD_LIBRARY_PATH : ${rpath}
|
|
||||||
|
|
||||||
ln -s $prog $out/bin/HubstaffClient
|
|
||||||
|
|
||||||
# Why is this needed? SEGV otherwise.
|
# Why is this needed? SEGV otherwise.
|
||||||
ln -s $opt/data/resources $opt/x86_64/resources
|
ln -s $opt/data/resources $opt/x86_64/resources
|
||||||
|
Loading…
x
Reference in New Issue
Block a user