Created
June 11, 2016 12:39
-
-
Save RonnyPfannschmidt/a4cb9f9b42f335ebde137a6d0d662b75 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> {}; | |
import ./enpass { | |
inherit (pkgs) dpkg patchelf openssl glib mesa libpulseaudio zlib dbus; | |
inherit stdenv fetchurl makeWrapper; | |
inherit (pkgs.xorg) libX11 libXext libXScrnSaver; | |
qt = pkgs.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, libX11 | |
, libXext, libXScrnSaver, glib, mesa, libpulseaudio, zlib, dbus | |
, qt, makeWrapper | |
, ...}: | |
let | |
data = import ./data.nix; | |
uselibs = [ | |
qt.qtbase | |
qt.qtmultimedia | |
qt.qtxmlpatterns | |
qt.qtwebsockets | |
openssl.out | |
mesa | |
libpulseaudio | |
zlib | |
dbus | |
libX11 | |
libXext | |
libXScrnSaver | |
glib.out | |
]; | |
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]; | |
phases = [ "unpackPhase" "installPhase" ]; | |
propagatedBuildInputs = uselibs; | |
libPath = stdenv.lib.makeLibraryPath ([ | |
stdenv.cc | |
stdenv.cc.cc.lib | |
] ++ uselibs); | |
unpackPhase = "dpkg -X $src ."; | |
installPhase='' | |
mkdir $out | |
cp -r opt/Enpass/* $out | |
rm $out/lib -r | |
patchelf \ | |
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | |
$out/bin/Enpass | |
wrapQtProgram $out/bin/Enpass \ | |
--set LD_LIBRARY_PATH "${libPath}" \ | |
--add QT_PLUGINS_PATH "$out/plugins/" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment