diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2011-06-07 21:50:12 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2011-06-07 21:50:12 +0000 |
commit | c5481bb1d8ba382451bf4fe0e98bcf95304596bd (patch) | |
tree | bc5fa081f5e6a4def04397e97254d6c7b7b58e0d /pkgs/tools/misc/pinentry | |
parent | ff7e3daf733a9ea42f24d78230af162334570da3 (diff) | |
download | nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.tar nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.tar.gz nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.tar.bz2 nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.tar.lz nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.tar.xz nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.tar.zst nixlib-c5481bb1d8ba382451bf4fe0e98bcf95304596bd.zip |
pinentry: make gtk UI really optional
svn path=/nixpkgs/trunk/; revision=27381
Diffstat (limited to 'pkgs/tools/misc/pinentry')
-rw-r--r-- | pkgs/tools/misc/pinentry/default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/pkgs/tools/misc/pinentry/default.nix b/pkgs/tools/misc/pinentry/default.nix index 004f3afa9b77..b9866878b7a8 100644 --- a/pkgs/tools/misc/pinentry/default.nix +++ b/pkgs/tools/misc/pinentry/default.nix @@ -1,11 +1,9 @@ { fetchurl, stdenv, pkgconfig, glib -, useGtk ? true, gtk ? null -, useNcurses ? true, ncurses ? null -, useQt4 ? false, qt4 ? null }: +, useGtk ? true, gtk +, useNcurses ? true, ncurses +, useQt4 ? false, qt4 }: -assert useGtk -> (gtk != null); -assert useNcurses -> (ncurses != null); -assert useQt4 -> (qt4 != null); +assert useGtk || useNcurses || useQt4; stdenv.mkDerivation rec { name = "pinentry-0.8.0"; @@ -15,7 +13,18 @@ stdenv.mkDerivation rec { sha256 = "06phs3gbs6gf0z9g28z3jgsw312dhhpdgzrx4hhps53xrbwpyv22"; }; - buildInputs = [ glib pkgconfig gtk ncurses ] ++ stdenv.lib.optional useQt4 qt4; + buildInputs = let opt = stdenv.lib.optional; in [] + ++ opt useGtk glib + ++ opt useGtk gtk + ++ opt useNcurses ncurses + ++ opt useQt4 qt4; + + configureFlags = [ "--disable-pinentry-gtk" "--disable-pinentry-qt" ] + ++ (if useGtk || useQt4 then ["--with-x"] else ["--without-x"]) + ++ (if useGtk then ["--enable-pinentry-gtk2"] else ["--disable-pinentry-gtk"]) + ++ (if useQt4 then ["--enable-pinentry-qt4"] else ["--disable-pinentry-qt4"]); + + buildNativeInputs = [ pkgconfig ]; meta = { description = "GnuPG's interface to passphrase input"; |