enpass test build setup using nixpkgs from git
{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/"
'';
}
{
version = "5.2.1.1";
path = "pool/main/e/enpass/enpass_5.2.1.1_amd64.deb";
sha256 = "772cb5656c55605f1c7ac58203ab0cf07894c57c19f1709dac36455287cbd953";
}
with import <nixpkgs> {};
callPackage ./enpass { qt = qt56; }