git.iko.soy/typeable/nixpkgs
on master help sign in
gnupg: disable gui/pinentry support by default

This solves the dependency cycle in gcr alternatively so there won't be two gnupg store paths in a standard NixOS system which has udisks2 enabled by default. NixOS users are expected to use the gpg-agent user service to pull in the appropriate pinentry flavour or install it on their systemPackages and set it in their local gnupg agent config instead. Co-authored-by: Florian Klink <flokli@flokli.de>

commitb5bea4ce32a26deb3b6d600893e37a4c347c66ab authorFranz Pletz <fpletz@fnordicwalking.de> dateSat 27 Oct 2018, 16:03 (8 years ago) parentedea9fe
6 files changed+16−11
nixos/doc/manual/release-notes/rl-2003.xml+8−1 nixos/modules/programs/gnupg.nix+1−1 pkgs/development/libraries/gcr/default.nix+1−5 pkgs/tools/security/gnupg/20.nix+1−1 pkgs/tools/security/gnupg/22.nix+1−1 pkgs/top-level/all-packages.nix+4−2
nixos/doc/manual/release-notes/rl-2003.xml+8−1
@@ -85,7 +85,14 @@
8585
8686 <itemizedlist>
8787 <listitem>
88− <para />
88+ <para>
89+ GnuPG is now built without support for a graphical passphrase entry
90+ by default. Please enable the <literal>gpg-agent</literal> user service
91+ via the NixOS option <literal>programs.gnupg.agent.enable</literal>.
92+ Note that upstream recommends using <literal>gpg-agent</literal> and
93+ will spawn a <literal>gpg-agent</literal> on the first invocation of
94+ GnuPG anyway.
95+ </para>
8996 </listitem>
9097 </itemizedlist>
9198 </section>
nixos/modules/programs/gnupg.nix+1−1
@@ -76,7 +76,7 @@ in
7676 thus overrides the pinentry option in gpg-agent.conf in the user's
7777 home directory.
7878 If not set at all, it'll pick an appropriate flavor depending on the
79− system configuration (qt3 flavor for lxqt and plasma5, gtk2 for xfce
79+ system configuration (qt flavor for lxqt and plasma5, gtk2 for xfce
8080 4.12, gnome3 on all other systems with X enabled, ncurses otherwise).
8181 '';
8282 };
pkgs/development/libraries/gcr/default.nix+1−5
@@ -24,11 +24,7 @@ stdenv.mkDerivation rec {
2424
2525 nativeBuildInputs = [ pkgconfig gettext gobject-introspection libxslt makeWrapper vala ];
2626
27− buildInputs = let
28− gpg = gnupg.override { guiSupport = false; }; # prevent build cycle with pinentry_gnome
29− in [
30− gpg libgcrypt libtasn1 dbus-glib pango gdk-pixbuf atk
31− ];
27+ buildInputs = [ gnupg libgcrypt libtasn1 dbus-glib pango gdk-pixbuf atk ];
3228
3329 propagatedBuildInputs = [ glib gtk3 p11-kit ];
3430
pkgs/tools/security/gnupg/20.nix+1−1
@@ -3,7 +3,7 @@
33
44# Each of the dependencies below are optional.
55# Gnupg can be built without them at the cost of reduced functionality.
6−, pinentry ? null, guiSupport ? true
6+, pinentry ? null, guiSupport ? false
77, openldap ? null, bzip2 ? null, libusb ? null, curl ? null
88}:
99
pkgs/tools/security/gnupg/22.nix+1−1
@@ -4,7 +4,7 @@
44
55# Each of the dependencies below are optional.
66# Gnupg can be built without them at the cost of reduced functionality.
7−, pinentry ? null, guiSupport ? true
7+, pinentry ? null, guiSupport ? false
88, adns ? null, gnutls ? null, libusb ? null, openldap ? null
99, readline ? null, zlib ? null, bzip2 ? null
1010}:
pkgs/top-level/all-packages.nix+4−2
@@ -3499,10 +3499,12 @@ in
34993499 gnupg1compat = callPackage ../tools/security/gnupg/1compat.nix { };
35003500 gnupg1 = gnupg1compat; # use config.packageOverrides if you prefer original gnupg1
35013501 gnupg20 = callPackage ../tools/security/gnupg/20.nix {
3502− pinentry = if stdenv.isDarwin then pinentry_mac else pinentry;
3502+ guiSupport = stdenv.isDarwin;
3503+ pinentry = if stdenv.isDarwin then pinentry_mac else pinentry_gtk2;
35033504 };
35043505 gnupg22 = callPackage ../tools/security/gnupg/22.nix {
3505− pinentry = if stdenv.isDarwin then pinentry_mac else pinentry;
3506+ guiSupport = stdenv.isDarwin;
3507+ pinentry = if stdenv.isDarwin then pinentry_mac else pinentry_gtk2;
35063508 };
35073509 gnupg = gnupg22;
35083510