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": {
"path": "pool/main/e/enpass/enpass_5.6.5_amd64.deb",
"sha256": "c7529b745aa462b56eac17af6fe88d4c1610fd2f446d222aaad9510f19212a7d",
"version": "5.6.5"
"path": "pool/main/e/enpass/enpass_6.0.1.239_amd64.deb",
"sha256": "408a2bb318564307607f13b52fec7667f425c01ac40cbe345ebfa191ab1479ba",
"version": "6.0.1.239"
},
"i386": {
"path": "pool/main/e/enpass/enpass_5.6.5_i386.deb",
"sha256": "de46e27d5552dcd9d72abac8e5c3b6161ad551ce191a2ee689c67367b63ff8f9",
"version": "5.6.5"
"path": "pool/main/e/enpass/enpass_5.6.9_i386.deb",
"sha256": "3f699ac3e2ecfd4afee1505d8d364d4f6b6b94c55ba989d0a80bd678ff66cb2c",
"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
, gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig
, gtk3, pango
, makeWrapper , python, pythonPackages, lib
, libredirect, lsof
, lsof, curl, libuuid, cups, mesa_drivers
}:
let
all_data = builtins.fromJSON (builtins.readFile ./data.json);
system_map = {
i686-linux = "i386";
# i686-linux = "i386"; Uncomment if enpass 6 becomes available on i386
x86_64-linux = "amd64";
};
@ -18,7 +18,7 @@ let
# used of both wrappers and libpath
libPath = lib.makeLibraryPath (with xorg; [
openssl
mesa_drivers
libGLU_combined
fontconfig
freetype
@ -29,17 +29,15 @@ let
libXi
libSM
libICE
libXext
libXrender
libXScrnSaver
libxcb
glib
gtk2
gtk3
pango
cairo
atk
gdk_pixbuf
jasper
stdenv.cc.cc
curl
libuuid
cups
]);
package = stdenv.mkDerivation rec {
@ -63,39 +61,22 @@ let
unpackPhase = "dpkg -X $src .";
installPhase=''
mkdir $out
cp -r opt/Enpass/* $out
mkdir -p $out/bin
cp -r opt/enpass/* $out/bin
cp -r usr/* $out
rm $out/bin/runenpass.sh
cp $out/bin/EnpassHelper/EnpassHelper{,.untampered}
cp $out/bin/EnpassHelper/EnpassNMHost{,.untampered}
sed \
-i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \
-i s@/opt/enpass/Enpass@$out/bin/Enpass@ \
$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
done
# The helper's sha256 sum must match, hence the use of libredirect.
# Also, lsof must be in the path for proper operation.
# lsof must be in PATH for proper operation
wrapProgram $out/bin/Enpass \
--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 \
--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" \
--set LD_LIBRARY_PATH "${libPath}" \
--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 = {