From 624b952ba50ece91a72cb5e746af3326bf284fd5 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Wed, 9 Aug 2023 10:37:14 +0200 Subject: [PATCH] eid-mw: fix build by restoring p11-kit module installation path Since https://github.com/NixOS/nixpkgs/pull/244633, the installation path for p11-kit was picked up to be in the p11-kit out path, which obviously doesn't work. This commit restores the out path to the value it was before https://github.com/NixOS/nixpkgs/pull/244633. --- pkgs/tools/security/eid-mw/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/security/eid-mw/default.nix b/pkgs/tools/security/eid-mw/default.nix index 102313ddbdfc..e399974b4c6e 100644 --- a/pkgs/tools/security/eid-mw/default.nix +++ b/pkgs/tools/security/eid-mw/default.nix @@ -1,21 +1,21 @@ { lib , stdenv , fetchFromGitHub -, autoreconfHook , autoconf-archive -, pkg-config +, autoreconfHook , makeWrapper +, pkg-config +, substituteAll , curl , gtk3 , libassuan , libbsd , libproxy , libxml2 +, nssTools , openssl , p11-kit , pcsclite -, nssTools -, substituteAll }: stdenv.mkDerivation rec { @@ -30,8 +30,15 @@ stdenv.mkDerivation rec { hash = "sha256-70UjfkH+rx1Q+2XEuAByoDsP5ZelyuGXaHdkjTe/sCY="; }; + postPatch = '' + sed 's@m4_esyscmd_s(.*,@[${version}],@' -i configure.ac + substituteInPlace configure.ac --replace 'p11kitcfdir=""' 'p11kitcfdir="'$out/share/p11-kit/modules'"' + ''; + + nativeBuildInputs = [ autoreconfHook autoconf-archive pkg-config makeWrapper ]; buildInputs = [ curl gtk3 libassuan libbsd libproxy libxml2 openssl p11-kit pcsclite ]; + preConfigure = '' mkdir openssl ln -s ${lib.getLib openssl}/lib openssl @@ -44,10 +51,6 @@ stdenv.mkDerivation rec { # pinentry uses hardcoded `/usr/bin/pinentry`, so use the built-in (uglier) dialogs for pinentry. configureFlags = [ "--disable-pinentry" ]; - postPatch = '' - sed 's@m4_esyscmd_s(.*,@[${version}],@' -i configure.ac - ''; - postInstall = let eid-nssdb-in = substituteAll {