Skip to content

Commit

Permalink
pinentry-*: build dependent variant with an override instead of choos…
Browse files Browse the repository at this point in the history
…ing the output

We don't want to depend on the *enabled* flavors of pinentry but on all
*possible* ones.
  • Loading branch information
SuperSandro2000 committed Jan 14, 2024
1 parent 945f9fe commit a880b50
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion nixos/modules/programs/gnupg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ in
};

agent.pinentryFlavor = mkOption {
type = types.nullOr (types.enum pkgs.pinentry.flavors);
type = types.nullOr (types.enum pkgs.pinentry.possibleFlavors);
example = "gnome3";
default = defaultPinentryFlavor;
defaultText = literalMD ''matching the configured desktop environment'';
Expand Down
5 changes: 4 additions & 1 deletion pkgs/tools/security/pinentry/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ pinentryMkDerivation rec {

outputs = [ "out" ] ++ enabledFlavors;

passthru = { flavors = enabledFlavors; };
passthru = {
flavors = enabledFlavors;
possibleFlavors = lib.attrNames flavorInfo;
};

meta = with lib; {
homepage = "http://gnupg.org/aegypten2/";
Expand Down
10 changes: 5 additions & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12070,11 +12070,11 @@ with pkgs;

pinentry = libsForQt5.callPackage ../tools/security/pinentry { };

pinentry-curses = (lib.getOutput "curses" pinentry);
pinentry-emacs = (lib.getOutput "emacs" pinentry);
pinentry-gtk2 = (lib.getOutput "gtk2" pinentry);
pinentry-qt = (lib.getOutput "qt" pinentry);
pinentry-gnome = (lib.getOutput "gnome3" pinentry);
pinentry-curses = pinentry.override { enabledFlavors = [ "curses" ]; };
pinentry-emacs = pinentry.override { enabledFlavors = [ "emacs" ]; };
pinentry-gtk2 = pinentry.override { enabledFlavors = [ "gtk2" ]; };
pinentry-qt = pinentry.override { enabledFlavors = [ "qt" ]; };
pinentry-gnome3 = pinentry.override { enabledFlavors = [ "gnome3" ]; };

pinentry_mac = callPackage ../tools/security/pinentry/mac.nix {
inherit (darwin.apple_sdk.frameworks) Cocoa;
Expand Down

0 comments on commit a880b50

Please sign in to comment.