tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
hubstaff: 1.2.15 → 1.3.0
Michal Rus
8 years ago
cd8d6ef9
a4f433c0
+14
-12
1 changed file
expand all
collapse all
unified
split
pkgs
applications
misc
hubstaff
default.nix
+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 }:
0
4
5
let
6
7
-
version = "1.2.15-590e8bc";
8
9
rpath = stdenv.lib.makeLibraryPath
10
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
11
libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3
12
-
curl ];
13
14
in
15
···
18
19
src = fetchurl {
20
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh";
21
-
sha256 = "142q8xvwn5gdmpv5x25py2lindr74jqncf8vvw22yb9nj5aqqsi6";
22
};
23
24
nativeBuildInputs = [ unzip makeWrapper ];
25
26
unpackCmd = ''
27
# 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
# but feel free to come up with something more reasonable.
30
dataZipOffset=$(grep --max-count=1 --byte-offset --only-matching --text ''$'PK\x03\x04' $curSrc | cut -d: -f1)
31
dd bs=$dataZipOffset skip=1 if=$curSrc of=data.zip 2>/dev/null
···
38
installPhase = ''
39
# TODO: handle 32-bit arch?
40
rm -r x86
0
41
42
opt=$out/opt/hubstaff
43
mkdir -p $out/bin $opt
44
cp -r . $opt/
45
46
-
prog=$opt/x86_64/HubstaffClient.bin.x86_64
0
0
0
47
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
52
53
# Why is this needed? SEGV otherwise.
54
ln -s $opt/data/resources $opt/x86_64/resources
···
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 }:
5
6
let
7
8
+
version = "1.3.0-9b2ba62";
9
10
rpath = stdenv.lib.makeLibraryPath
11
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
12
libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3
13
+
curl libXfixes libXScrnSaver ];
14
15
in
16
···
19
20
src = fetchurl {
21
url = "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/${version}/Hubstaff-${version}.sh";
22
+
sha256 = "1dxzyl3yxbfmbw1pv8k3vhqzbmyyf16zkgrhzsbm866nmbgnqk1s";
23
};
24
25
nativeBuildInputs = [ unzip makeWrapper ];
26
27
unpackCmd = ''
28
# MojoSetups have a ZIP file at the end. ZIP’s magic string is
29
+
# most often PK\x03\x04. This has worked for all past updates,
30
# but feel free to come up with something more reasonable.
31
dataZipOffset=$(grep --max-count=1 --byte-offset --only-matching --text ''$'PK\x03\x04' $curSrc | cut -d: -f1)
32
dd bs=$dataZipOffset skip=1 if=$curSrc of=data.zip 2>/dev/null
···
39
installPhase = ''
40
# TODO: handle 32-bit arch?
41
rm -r x86
42
+
rm -r x86_64/lib64
43
44
opt=$out/opt/hubstaff
45
mkdir -p $out/bin $opt
46
cp -r . $opt/
47
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
52
53
+
ln -s $opt/x86_64/HubstaffClient.bin.x86_64 $out/bin/HubstaffClient
0
0
0
54
55
# Why is this needed? SEGV otherwise.
56
ln -s $opt/data/resources $opt/x86_64/resources