-
-
Save cleverca22/312977930eacfc5367bdb05f8ddeacf6 to your computer and use it in GitHub Desktop.
enpass test build setup using nixpkgs from git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
callPackage ./enpass { qt = qt56; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
version = "5.2.1.1"; | |
path = "pool/main/e/enpass/enpass_5.2.1.1_amd64.deb"; | |
sha256 = "772cb5656c55605f1c7ac58203ab0cf07894c57c19f1709dac36455287cbd953"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{stdenv, fetchurl, dpkg, patchelf, openssl, xorg | |
, glib, mesa, libpulseaudio, zlib, dbus | |
, qt, makeWrapper | |
, ...}: | |
let | |
data = import ./data.nix; | |
uselibs = with xorg; [ | |
qt.qtbase | |
qt.qtmultimedia | |
qt.qtxmlpatterns | |
qt.qtwebsockets | |
openssl.out | |
mesa | |
libpulseaudio | |
zlib | |
dbus | |
libX11 | |
libXext | |
libXScrnSaver | |
glib.out | |
]; | |
libPath = stdenv.lib.makeLibraryPath ([ | |
stdenv.cc | |
stdenv.cc.cc.lib | |
] ++ uselibs); | |
in stdenv.mkDerivation rec { | |
version = data.version; | |
name = "enpass-${version}"; | |
src = fetchurl { | |
url = "http://repo.sinew.in/${data.path}"; | |
sha256 = data.sha256; | |
}; | |
buildInputs = [makeWrapper dpkg patchelf qt.makeQtWrapper ]; | |
phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; | |
unpackPhase = "dpkg -X $src ."; | |
installPhase='' | |
mkdir $out | |
cp -r opt/Enpass/* $out | |
rm $out/lib -r | |
rm -r $out/plugins/platforms/ | |
patchelf \ | |
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | |
$out/bin/Enpass | |
wrapQtProgram $out/bin/Enpass --set LD_LIBRARY_PATH "${libPath}:$out/plugins/sqldrivers/" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment