enpass: 5.6.5 -> 6.0.1

This commit is contained in:
Guillaume Koenig 2019-01-11 22:32:00 +01:00
parent b54d9e27cb
commit f6a3be1f44
2 changed files with 22 additions and 41 deletions

View File

@ -1,12 +1,12 @@
{ {
"amd64": { "amd64": {
"path": "pool/main/e/enpass/enpass_5.6.5_amd64.deb", "path": "pool/main/e/enpass/enpass_6.0.1.239_amd64.deb",
"sha256": "c7529b745aa462b56eac17af6fe88d4c1610fd2f446d222aaad9510f19212a7d", "sha256": "408a2bb318564307607f13b52fec7667f425c01ac40cbe345ebfa191ab1479ba",
"version": "5.6.5" "version": "6.0.1.239"
}, },
"i386": { "i386": {
"path": "pool/main/e/enpass/enpass_5.6.5_i386.deb", "path": "pool/main/e/enpass/enpass_5.6.9_i386.deb",
"sha256": "de46e27d5552dcd9d72abac8e5c3b6161ad551ce191a2ee689c67367b63ff8f9", "sha256": "3f699ac3e2ecfd4afee1505d8d364d4f6b6b94c55ba989d0a80bd678ff66cb2c",
"version": "5.6.5" "version": "5.6.9"
} }
} }

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl, dpkg, openssl, xorg { stdenv, fetchurl, dpkg, xorg
, glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype , glib, libGLU_combined, libpulseaudio, zlib, dbus, fontconfig, freetype
, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig , gtk3, pango
, makeWrapper , python, pythonPackages, lib , makeWrapper , python, pythonPackages, lib
, libredirect, lsof , lsof, curl, libuuid, cups, mesa_drivers
}: }:
let let
all_data = builtins.fromJSON (builtins.readFile ./data.json); all_data = builtins.fromJSON (builtins.readFile ./data.json);
system_map = { system_map = {
i686-linux = "i386"; # i686-linux = "i386"; Uncomment if enpass 6 becomes available on i386
x86_64-linux = "amd64"; x86_64-linux = "amd64";
}; };
@ -18,7 +18,7 @@ let
# used of both wrappers and libpath # used of both wrappers and libpath
libPath = lib.makeLibraryPath (with xorg; [ libPath = lib.makeLibraryPath (with xorg; [
openssl mesa_drivers
libGLU_combined libGLU_combined
fontconfig fontconfig
freetype freetype
@ -29,17 +29,15 @@ let
libXi libXi
libSM libSM
libICE libICE
libXext
libXrender libXrender
libXScrnSaver libXScrnSaver
libxcb
glib glib
gtk2 gtk3
pango pango
cairo curl
atk libuuid
gdk_pixbuf cups
jasper
stdenv.cc.cc
]); ]);
package = stdenv.mkDerivation rec { package = stdenv.mkDerivation rec {
@ -63,39 +61,22 @@ let
unpackPhase = "dpkg -X $src ."; unpackPhase = "dpkg -X $src .";
installPhase='' installPhase=''
mkdir $out mkdir -p $out/bin
cp -r opt/Enpass/* $out cp -r opt/enpass/* $out/bin
cp -r usr/* $out cp -r usr/* $out
rm $out/bin/runenpass.sh
cp $out/bin/EnpassHelper/EnpassHelper{,.untampered}
cp $out/bin/EnpassHelper/EnpassNMHost{,.untampered}
sed \ sed \
-i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \ -i s@/opt/enpass/Enpass@$out/bin/Enpass@ \
$out/share/applications/enpass.desktop $out/share/applications/enpass.desktop
for i in $out/bin/{Enpass,EnpassHelper/{EnpassHelper,EnpassNMHost}}; do for i in $out/bin/{Enpass,importer_enpass}; do
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i
done done
# The helper's sha256 sum must match, hence the use of libredirect. # lsof must be in PATH for proper operation
# Also, lsof must be in the path for proper operation.
wrapProgram $out/bin/Enpass \ wrapProgram $out/bin/Enpass \
--set LD_LIBRARY_PATH "${libPath}:$out/lib:$out/plugins/sqldrivers" \ --set LD_LIBRARY_PATH "${libPath}" \
--set QT_PLUGIN_PATH "$out/plugins" \
--set QT_QPA_PLATFORM_PLUGIN_PATH "$out/plugins/platforms" \
--set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \
--set HIDE_TOOLBAR_LINE 0 \
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS "$out/bin/EnpassHelper/EnpassHelper=$out/bin/EnpassHelper/EnpassHelper.untampered:$out/bin/EnpassHelper/EnpassNMHost=$out/bin/EnpassHelper/EnpassNMHost.untampered" \
--prefix PATH : ${lsof}/bin --prefix PATH : ${lsof}/bin
makeWrapper $out/bin/EnpassHelper/{EnpassNMHost,runNativeMessaging.sh} \
--set LD_LIBRARY_PATH "${libPath}:$out/lib:$out/plugins/sqldrivers" \
--set QT_PLUGIN_PATH "$out/plugins" \
--set QT_QPA_PLATFORM_PLUGIN_PATH "$out/plugins/platforms" \
--set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \
--set HIDE_TOOLBAR_LINE 0
''; '';
}; };
updater = { updater = {