From 39089253c0cbd2a3bde3a337ce87e790050f269e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 5 Dec 2022 02:42:36 +0100 Subject: [PATCH] pinentry: add option to build without libsecret --- pkgs/tools/security/pinentry/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/security/pinentry/default.nix b/pkgs/tools/security/pinentry/default.nix index 68f642bf95b0..61f84e5d76e9 100644 --- a/pkgs/tools/security/pinentry/default.nix +++ b/pkgs/tools/security/pinentry/default.nix @@ -1,6 +1,7 @@ { fetchurl, mkDerivation, fetchpatch, stdenv, lib, pkg-config, autoreconfHook, wrapGAppsHook , libgpg-error, libassuan, qtbase, wrapQtAppsHook -, ncurses, gtk2, gcr, libcap, libsecret +, ncurses, gtk2, gcr, libcap +, withLibsecret ? true, libsecret , enabledFlavors ? [ "curses" "tty" "gtk2" "emacs" ] ++ lib.optionals stdenv.isLinux [ "gnome3" ] ++ lib.optionals (!stdenv.isDarwin) [ "qt" ] @@ -43,7 +44,8 @@ pinentryMkDerivation rec { nativeBuildInputs = [ pkg-config autoreconfHook ] ++ lib.concatMap(f: flavorInfo.${f}.nativeBuildInputs or []) enabledFlavors; - buildInputs = [ libgpg-error libassuan libsecret ] + buildInputs = [ libgpg-error libassuan ] + ++ lib.optional withLibsecret libsecret ++ lib.optional (!stdenv.isDarwin) libcap ++ lib.concatMap(f: flavorInfo.${f}.buildInputs or []) enabledFlavors; @@ -60,8 +62,8 @@ pinentryMkDerivation rec { ]; configureFlags = [ - (lib.withFeature (libcap != null) "libcap") - (lib.enableFeature (libsecret != null) "libsecret") + (lib.withFeature (libcap != null) "libcap") + (lib.enableFeature withLibsecret "libsecret") ] ++ (map enableFeaturePinentry (lib.attrNames flavorInfo)); postInstall =