From c81c10624c65927cd8008b71f878ce0b13829dab Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 6 Aug 2020 12:01:45 +0200 Subject: gnupgMinimal: move to all-packages.nix, use from inside systemd This makes things more consistent with how we pass in utillinuxMinimal. There's already a minimal argument in the gnupg derivation, but this gnupg is even more minimal. Instead of defining a gnupgSuperMinimal, we define it inline inside systemd. --- pkgs/os-specific/linux/systemd/default.nix | 19 ++----------------- pkgs/top-level/all-packages.nix | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'pkgs') diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 161b74aea7639..2609dc14bbc36 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -17,22 +17,7 @@ , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools }: -let gnupg-minimal = gnupg.override { - enableMinimal = true; - guiSupport = false; - pcsclite = null; - sqlite = null; - pinentry = null; - adns = null; - gnutls = null; - libusb1 = null; - openldap = null; - readline = null; - zlib = null; - bzip2 = null; -}; - -in stdenv.mkDerivation { +stdenv.mkDerivation { version = "246"; pname = "systemd"; @@ -214,7 +199,7 @@ in stdenv.mkDerivation { # absolute paths to gpg & tar substituteInPlace src/import/pull-common.c \ - --replace '"gpg"' '"${gnupg-minimal}/bin/gpg"' + --replace '"gpg"' '"${gnupg}/bin/gpg"' for file in src/import/{{export,import,pull}-tar,import-common}.c; do substituteInPlace $file \ --replace '"tar"' '"${gnutar}/bin/tar"' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b9db0489c7f05..a9020acc83c94 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18066,8 +18066,25 @@ in sysstat = callPackage ../os-specific/linux/sysstat { }; systemd = callPackage ../os-specific/linux/systemd { - utillinux = utillinuxMinimal; # break the cyclic dependency + # break some cyclic dependencies + utillinux = utillinuxMinimal; + # provide a super minimal gnupg used for systemd-machined + gnupg = callPackage ../tools/security/gnupg/22.nix { + enableMinimal = true; + guiSupport = false; + pcsclite = null; + sqlite = null; + pinentry = null; + adns = null; + gnutls = null; + libusb1 = null; + openldap = null; + readline = null; + zlib = null; + bzip2 = null; + }; }; + udev = systemd; # TODO: move to aliases.nix systemd-wait = callPackage ../os-specific/linux/systemd-wait { }; -- cgit 1.4.1