tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
enpass: 5.6.5 -> 6.0.1
Guillaume Koenig
7 years ago
f6a3be1f
b54d9e27
+22
-41
2 changed files
expand all
collapse all
unified
split
pkgs
tools
security
enpass
data.json
default.nix
+6
-6
pkgs/tools/security/enpass/data.json
···
1
{
2
"amd64": {
3
-
"path": "pool/main/e/enpass/enpass_5.6.5_amd64.deb",
4
-
"sha256": "c7529b745aa462b56eac17af6fe88d4c1610fd2f446d222aaad9510f19212a7d",
5
-
"version": "5.6.5"
6
},
7
"i386": {
8
-
"path": "pool/main/e/enpass/enpass_5.6.5_i386.deb",
9
-
"sha256": "de46e27d5552dcd9d72abac8e5c3b6161ad551ce191a2ee689c67367b63ff8f9",
10
-
"version": "5.6.5"
11
}
12
}
···
1
{
2
"amd64": {
3
+
"path": "pool/main/e/enpass/enpass_6.0.1.239_amd64.deb",
4
+
"sha256": "408a2bb318564307607f13b52fec7667f425c01ac40cbe345ebfa191ab1479ba",
5
+
"version": "6.0.1.239"
6
},
7
"i386": {
8
+
"path": "pool/main/e/enpass/enpass_5.6.9_i386.deb",
9
+
"sha256": "3f699ac3e2ecfd4afee1505d8d364d4f6b6b94c55ba989d0a80bd678ff66cb2c",
10
+
"version": "5.6.9"
11
}
12
}
+16
-35
pkgs/tools/security/enpass/default.nix
···
1
-
{ stdenv, fetchurl, dpkg, openssl, xorg
2
, glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype
3
-
, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig
4
, makeWrapper , python, pythonPackages, lib
5
-
, libredirect, lsof
6
}:
7
8
let
9
all_data = builtins.fromJSON (builtins.readFile ./data.json);
10
system_map = {
11
-
i686-linux = "i386";
12
x86_64-linux = "amd64";
13
};
14
···
18
19
# used of both wrappers and libpath
20
libPath = lib.makeLibraryPath (with xorg; [
21
-
openssl
22
libGLU_combined
23
fontconfig
24
freetype
···
29
libXi
30
libSM
31
libICE
32
-
libXext
33
libXrender
34
libXScrnSaver
0
35
glib
36
-
gtk2
37
pango
38
-
cairo
39
-
atk
40
-
gdk_pixbuf
41
-
jasper
42
-
stdenv.cc.cc
43
]);
44
package = stdenv.mkDerivation rec {
45
···
63
64
unpackPhase = "dpkg -X $src .";
65
installPhase=''
66
-
mkdir $out
67
-
cp -r opt/Enpass/* $out
68
cp -r usr/* $out
69
-
rm $out/bin/runenpass.sh
70
-
cp $out/bin/EnpassHelper/EnpassHelper{,.untampered}
71
-
cp $out/bin/EnpassHelper/EnpassNMHost{,.untampered}
72
73
sed \
74
-
-i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \
75
$out/share/applications/enpass.desktop
76
77
-
for i in $out/bin/{Enpass,EnpassHelper/{EnpassHelper,EnpassNMHost}}; do
78
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i
79
done
80
81
-
# The helper's sha256 sum must match, hence the use of libredirect.
82
-
# Also, lsof must be in the path for proper operation.
83
wrapProgram $out/bin/Enpass \
84
-
--set LD_LIBRARY_PATH "${libPath}:$out/lib:$out/plugins/sqldrivers" \
85
-
--set QT_PLUGIN_PATH "$out/plugins" \
86
-
--set QT_QPA_PLATFORM_PLUGIN_PATH "$out/plugins/platforms" \
87
-
--set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \
88
-
--set HIDE_TOOLBAR_LINE 0 \
89
-
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
90
-
--set NIX_REDIRECTS "$out/bin/EnpassHelper/EnpassHelper=$out/bin/EnpassHelper/EnpassHelper.untampered:$out/bin/EnpassHelper/EnpassNMHost=$out/bin/EnpassHelper/EnpassNMHost.untampered" \
91
--prefix PATH : ${lsof}/bin
92
-
93
-
makeWrapper $out/bin/EnpassHelper/{EnpassNMHost,runNativeMessaging.sh} \
94
-
--set LD_LIBRARY_PATH "${libPath}:$out/lib:$out/plugins/sqldrivers" \
95
-
--set QT_PLUGIN_PATH "$out/plugins" \
96
-
--set QT_QPA_PLATFORM_PLUGIN_PATH "$out/plugins/platforms" \
97
-
--set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \
98
-
--set HIDE_TOOLBAR_LINE 0
99
'';
100
};
101
updater = {
···
1
+
{ stdenv, fetchurl, dpkg, xorg
2
, glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype
3
+
, gtk3, pango
4
, makeWrapper , python, pythonPackages, lib
5
+
, lsof, curl, libuuid, cups, mesa_drivers
6
}:
7
8
let
9
all_data = builtins.fromJSON (builtins.readFile ./data.json);
10
system_map = {
11
+
# i686-linux = "i386"; Uncomment if enpass 6 becomes available on i386
12
x86_64-linux = "amd64";
13
};
14
···
18
19
# used of both wrappers and libpath
20
libPath = lib.makeLibraryPath (with xorg; [
21
+
mesa_drivers
22
libGLU_combined
23
fontconfig
24
freetype
···
29
libXi
30
libSM
31
libICE
0
32
libXrender
33
libXScrnSaver
34
+
libxcb
35
glib
36
+
gtk3
37
pango
38
+
curl
39
+
libuuid
40
+
cups
0
0
41
]);
42
package = stdenv.mkDerivation rec {
43
···
61
62
unpackPhase = "dpkg -X $src .";
63
installPhase=''
64
+
mkdir -p $out/bin
65
+
cp -r opt/enpass/* $out/bin
66
cp -r usr/* $out
0
0
0
67
68
sed \
69
+
-i s@/opt/enpass/Enpass@$out/bin/Enpass@ \
70
$out/share/applications/enpass.desktop
71
72
+
for i in $out/bin/{Enpass,importer_enpass}; do
73
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i
74
done
75
76
+
# lsof must be in PATH for proper operation
0
77
wrapProgram $out/bin/Enpass \
78
+
--set LD_LIBRARY_PATH "${libPath}" \
0
0
0
0
0
0
79
--prefix PATH : ${lsof}/bin
0
0
0
0
0
0
0
80
'';
81
};
82
updater = {