mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
linux: do not depend on systemd indirectly
utillinux depends on systemd because: * uuidd supports socket activation * lslogins can show recent journal entries * fstrim comes with a service file (and we use this in NixOS) * logger can write journal entries (See https://www.openembedded.org/pipermail/openembedded-core/2015-February/102069.html) systemd doesn't depend on utillinux but on utillinuxMinimal which is a version of utillinux without these features to avoid cyclic dependencies. With this change, the linux kernel (of which i don't fully understand why it would depend on util-linux in the first place, but this was added in https://github.com/NixOS/nixpkgs/pull/32137/files without too much explanation) depends on the minimal version of util-linux too. This makes it that every time we change build flags in systemd the linux kernel doesn't have to wastefully rebuild.
This commit is contained in:
parent
20e67f1fb8
commit
d103dc4998
@ -1,6 +1,6 @@
|
||||
{ buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
|
||||
, libelf, cpio
|
||||
, utillinux
|
||||
, utillinuxMinimal
|
||||
, writeTextFile
|
||||
}:
|
||||
|
||||
@ -281,7 +281,7 @@ let
|
||||
in
|
||||
|
||||
assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null;
|
||||
assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null;
|
||||
assert stdenv.lib.versionAtLeast version "4.15" -> utillinuxMinimal != null;
|
||||
stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // {
|
||||
pname = "linux";
|
||||
inherit version;
|
||||
@ -292,7 +292,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
|
||||
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
|
||||
++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
|
||||
++ optional (stdenv.lib.versionAtLeast version "4.14") libelf
|
||||
++ optional (stdenv.lib.versionAtLeast version "4.15") utillinux
|
||||
++ optional (stdenv.lib.versionAtLeast version "4.15") utillinuxMinimal
|
||||
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
|
||||
++ optional (stdenv.lib.versionAtLeast version "5.2") cpio
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user