From cf7b63df5b9efdef4e8e1b3261d7040199f7e671 Mon Sep 17 00:00:00 2001 From: volth Date: Wed, 5 Aug 2020 02:32:41 +0000 Subject: gcc.arch: refactor, move tables under lib/ --- nixos/modules/services/misc/nix-daemon.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 924a007efc6..37596e9c54d 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -595,15 +595,8 @@ in nix.systemFeatures = mkDefault ( [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) ( - # a x86_64 builder can run code for `platform.gcc.arch` and minor architectures: - [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ { - sandybridge = [ "gccarch-westmere" ]; - ivybridge = [ "gccarch-westmere" "gccarch-sandybridge" ]; - haswell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ]; - broadwell = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" ]; - skylake = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" ]; - skylake-avx512 = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" "gccarch-haswell" "gccarch-broadwell" "gccarch-skylake" ]; - }.${pkgs.hostPlatform.platform.gcc.arch} or [] + # a x86_64 builder can run code for `platform.gcc.arch` and inferior architectures: + [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} ) ); -- cgit 1.4.1 From 707e43b9612c58c2dde122586d1089f22c49d164 Mon Sep 17 00:00:00 2001 From: volth Date: Wed, 5 Aug 2020 17:02:30 +0000 Subject: nix-daemon: platform.gcc.arch is not x86 specific --- nixos/modules/services/misc/nix-daemon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 37596e9c54d..1f7d6e0f17e 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -594,7 +594,7 @@ in nix.systemFeatures = mkDefault ( [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ - optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) ( + optionals (pkgs.hostPlatform.platform ? gcc.arch) ( # a x86_64 builder can run code for `platform.gcc.arch` and inferior architectures: [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} ) -- cgit 1.4.1 From 5c384e12682515ec87ff14838d66771dd1f7edf7 Mon Sep 17 00:00:00 2001 From: volth Date: Wed, 5 Aug 2020 17:03:45 +0000 Subject: nix-daemon: platform.gcc.arch is not x86 specific --- nixos/modules/services/misc/nix-daemon.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 1f7d6e0f17e..7e092e5b8b8 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -595,8 +595,9 @@ in nix.systemFeatures = mkDefault ( [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ optionals (pkgs.hostPlatform.platform ? gcc.arch) ( - # a x86_64 builder can run code for `platform.gcc.arch` and inferior architectures: - [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} + # a builder can run code for `platform.gcc.arch` and inferior architectures + [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ + map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} ) ); -- cgit 1.4.1 From fc726e34948e35c47053514dab437b644fe9e047 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 29 Aug 2020 22:38:25 -0500 Subject: Revert "nixos/nix-daemon.nix: assert distributedBuilds and buildMachines!=[]" This reverts commit 67b6e5639126ab6e8ec5d2b303aa9736a626b609. This reverts commit 250885d0caed9ab910e801d7a3c21d6f83d4cdae. Causes issues for some configs, see https://github.com/NixOS/nixpkgs/commit/67b6e5639126ab6e8ec5d2b303aa9736a626b609 --- nixos/modules/services/misc/nix-daemon.nix | 7 ------- 1 file changed, 7 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 924a007efc6..0fbc9cecb4d 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -500,13 +500,6 @@ in config = { - assertions = [ - { - assertion = config.nix.distributedBuilds || config.nix.buildMachines == []; - message = "You must set `nix.distributedBuilds = true` to use nix.buildMachines"; - } - ]; - nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; nix.binaryCaches = [ "https://cache.nixos.org/" ]; -- cgit 1.4.1 From cebf9198f3fe80fa38a8c57eb3b02ac4c1df3e8a Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Wed, 14 Oct 2020 01:46:17 +0200 Subject: treewide: De-inline uses of lib.boolToString This commit should not change eval results --- lib/types.nix | 2 +- nixos/modules/services/mail/rspamd.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 2 +- nixos/modules/services/networking/prosody.nix | 2 +- nixos/modules/services/security/fail2ban.nix | 4 ++-- nixos/modules/services/security/usbguard.nix | 4 ++-- nixos/modules/services/x11/display-managers/gdm.nix | 2 +- nixos/modules/services/x11/display-managers/sddm.nix | 4 ++-- pkgs/applications/misc/razergenie/default.nix | 4 ++-- pkgs/applications/video/obs-studio/wlrobs.nix | 4 ++-- pkgs/development/go-modules/generic/default.nix | 2 +- pkgs/development/libraries/gdk-pixbuf/default.nix | 3 ++- pkgs/development/libraries/geoclue/default.nix | 2 +- pkgs/development/libraries/glib/default.nix | 2 +- pkgs/development/libraries/libsoup/default.nix | 4 ++-- pkgs/development/libraries/mesa/default.nix | 4 ++-- pkgs/development/libraries/v8/default.nix | 2 +- pkgs/development/ocaml-modules/uchar/default.nix | 4 ++-- pkgs/os-specific/linux/dpdk/default.nix | 2 +- pkgs/tools/networking/network-manager/libnma/default.nix | 3 ++- 20 files changed, 30 insertions(+), 28 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/lib/types.nix b/lib/types.nix index e9e45dc25c7..30b053db486 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -499,7 +499,7 @@ rec { show = v: if builtins.isString v then ''"${v}"'' else if builtins.isInt v then builtins.toString v - else if builtins.isBool v then if v then "true" else "false" + else if builtins.isBool v then boolToString v else ''<${builtins.typeOf v}>''; in mkOptionType rec { diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix index aacdbe2aeed..86a3f52107d 100644 --- a/nixos/modules/services/mail/rspamd.nix +++ b/nixos/modules/services/mail/rspamd.nix @@ -153,7 +153,7 @@ let ${concatStringsSep "\n" (mapAttrsToList (name: value: let includeName = if name == "rspamd_proxy" then "proxy" else name; - tryOverride = if value.extraConfig == "" then "true" else "false"; + tryOverride = boolToString (value.extraConfig == ""); in '' worker "${value.type}" { type = "${value.type}"; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 2680b1cc0d3..ed05882a634 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -45,7 +45,7 @@ let trusted-substituters = ${toString cfg.trustedBinaryCaches} trusted-public-keys = ${toString cfg.binaryCachePublicKeys} auto-optimise-store = ${boolToString cfg.autoOptimiseStore} - require-sigs = ${if cfg.requireSignedBinaryCaches then "true" else "false"} + require-sigs = ${boolToString cfg.requireSignedBinaryCaches} trusted-users = ${toString cfg.trustedUsers} allowed-users = ${toString cfg.allowedUsers} ${optionalString (!cfg.distributedBuilds) '' diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index a6c1cb0f479..e7a7aa700be 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -261,7 +261,7 @@ let toLua = x: if builtins.isString x then ''"${x}"'' - else if builtins.isBool x then (if x == true then "true" else "false") + else if builtins.isBool x then boolToString x else if builtins.isInt x then toString x else if builtins.isList x then ''{ ${lib.concatStringsSep ", " (map (n: toLua n) x) } }'' else throw "Invalid Lua value"; diff --git a/nixos/modules/services/security/fail2ban.nix b/nixos/modules/services/security/fail2ban.nix index 3f84f9c2560..cf0d72d5c53 100644 --- a/nixos/modules/services/security/fail2ban.nix +++ b/nixos/modules/services/security/fail2ban.nix @@ -282,12 +282,12 @@ in services.fail2ban.jails.DEFAULT = '' ${optionalString cfg.bantime-increment.enable '' # Bantime incremental - bantime.increment = ${if cfg.bantime-increment.enable then "true" else "false"} + bantime.increment = ${boolToString cfg.bantime-increment.enable} bantime.maxtime = ${cfg.bantime-increment.maxtime} bantime.factor = ${cfg.bantime-increment.factor} bantime.formula = ${cfg.bantime-increment.formula} bantime.multipliers = ${cfg.bantime-increment.multipliers} - bantime.overalljails = ${if cfg.bantime-increment.overalljails then "true" else "false"} + bantime.overalljails = ${boolToString cfg.bantime-increment.overalljails} ''} # Miscellaneous options ignoreip = 127.0.0.1/8 ${optionalString config.networking.enableIPv6 "::1"} ${concatStringsSep " " cfg.ignoreIP} diff --git a/nixos/modules/services/security/usbguard.nix b/nixos/modules/services/security/usbguard.nix index 16a90da5231..71fd71a2cab 100644 --- a/nixos/modules/services/security/usbguard.nix +++ b/nixos/modules/services/security/usbguard.nix @@ -19,13 +19,13 @@ let PresentDevicePolicy=${cfg.presentDevicePolicy} PresentControllerPolicy=${cfg.presentControllerPolicy} InsertedDevicePolicy=${cfg.insertedDevicePolicy} - RestoreControllerDeviceState=${if cfg.restoreControllerDeviceState then "true" else "false"} + RestoreControllerDeviceState=${boolToString cfg.restoreControllerDeviceState} # this does not seem useful for endusers to change DeviceManagerBackend=uevent IPCAllowedUsers=${concatStringsSep " " cfg.IPCAllowedUsers} IPCAllowedGroups=${concatStringsSep " " cfg.IPCAllowedGroups} IPCAccessControlFiles=/var/lib/usbguard/IPCAccessControl.d/ - DeviceRulesWithPort=${if cfg.deviceRulesWithPort then "true" else "false"} + DeviceRulesWithPort=${boolToString cfg.deviceRulesWithPort} # HACK: that way audit logs still land in the journal AuditFilePath=/dev/null ''; diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index eae70a57c78..25b424e485f 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -264,7 +264,7 @@ in # presented and there's a little delay. environment.etc."gdm/custom.conf".text = '' [daemon] - WaylandEnable=${if cfg.gdm.wayland then "true" else "false"} + WaylandEnable=${boolToString cfg.gdm.wayland} ${optionalString cfg.autoLogin.enable ( if cfg.gdm.autoLogin.delay > 0 then '' TimedLoginEnable=true diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix index e63bb2e4453..4040b903426 100644 --- a/nixos/modules/services/x11/display-managers/sddm.nix +++ b/nixos/modules/services/x11/display-managers/sddm.nix @@ -55,10 +55,10 @@ let XauthPath=${pkgs.xorg.xauth}/bin/xauth DisplayCommand=${Xsetup} DisplayStopCommand=${Xstop} - EnableHidpi=${if cfg.enableHidpi then "true" else "false"} + EnableHidpi=${boolToString cfg.enableHidpi} [Wayland] - EnableHidpi=${if cfg.enableHidpi then "true" else "false"} + EnableHidpi=${boolToString cfg.enableHidpi} SessionDir=${dmcfg.sessionData.desktops}/share/wayland-sessions ${optionalString dmcfg.autoLogin.enable '' diff --git a/pkgs/applications/misc/razergenie/default.nix b/pkgs/applications/misc/razergenie/default.nix index 9042ab38e75..ac0f373dc93 100644 --- a/pkgs/applications/misc/razergenie/default.nix +++ b/pkgs/applications/misc/razergenie/default.nix @@ -27,8 +27,8 @@ in stdenv.mkDerivation { ]; mesonFlags = [ - "-Denable_experimental=${if enableExperimental then "true" else "false"}" - "-Dinclude_matrix_discovery=${if includeMatrixDiscovery then "true" else "false"}" + "-Denable_experimental=${lib.boolToString enableExperimental}" + "-Dinclude_matrix_discovery=${lib.boolToString includeMatrixDiscovery}" ]; meta = with lib; { diff --git a/pkgs/applications/video/obs-studio/wlrobs.nix b/pkgs/applications/video/obs-studio/wlrobs.nix index 99486a9ccc0..14bc80dd388 100644 --- a/pkgs/applications/video/obs-studio/wlrobs.nix +++ b/pkgs/applications/video/obs-studio/wlrobs.nix @@ -7,7 +7,7 @@ # ln -s ~/.nix-profile/share/obs/obs-plugins/wlrobs/bin/64bit/libwlrobs.so ~/.config/obs-studio/plugins/wlrobs/bin/64bit { stdenv, fetchhg, wayland, obs-studio , meson, ninja, pkgconfig, libX11 -, dmabufSupport ? false, libdrm ? null, libGL ? null}: +, dmabufSupport ? false, libdrm ? null, libGL ? null, lib}: assert dmabufSupport -> libdrm != null && libGL != null; @@ -29,7 +29,7 @@ stdenv.mkDerivation { ''; mesonFlags = [ - "-Duse_dmabuf=${if dmabufSupport then "true" else "false"}" + "-Duse_dmabuf=${lib.boolToString dmabufSupport}" ]; meta = with stdenv.lib; { diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 7db4992d1d6..9efaa860832 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -47,7 +47,7 @@ let removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}''; - deleteFlag = if deleteVendor then "true" else "false"; + deleteFlag = lib.boolToString deleteVendor; vendCommand = if runVend then "${vend}/bin/vend" else "false"; diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 08b8f70b2d9..1f4bc5c12ad 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -21,6 +21,7 @@ , doCheck ? false , makeWrapper , fetchpatch +, lib }: stdenv.mkDerivation rec { @@ -74,7 +75,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Ddocs=true" "-Dx11=false" # use gdk-pixbuf-xlib - "-Dgir=${if gobject-introspection != null then "true" else "false"}" + "-Dgir=${lib.boolToString (gobject-introspection != null)}" "-Dgio_sniffing=false" ]; diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix index da76c6dfedc..74d778c5c55 100644 --- a/pkgs/development/libraries/geoclue/default.nix +++ b/pkgs/development/libraries/geoclue/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dsystemd-system-unit-dir=${placeholder "out"}/etc/systemd/system" - "-Ddemo-agent=${if withDemoAgent then "true" else "false"}" + "-Ddemo-agent=${boolToString withDemoAgent}" "--sysconfdir=/etc" "-Dsysconfdir_install=${placeholder "out"}/etc" "-Ddbus-srv-user=geoclue" diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 88848deec41..df19b9fc88c 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation rec { mesonFlags = [ # Avoid the need for gobject introspection binaries in PATH in cross-compiling case. # Instead we just copy them over from the native output. - "-Dgtk_doc=${if stdenv.hostPlatform == stdenv.buildPlatform then "true" else "false"}" + "-Dgtk_doc=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" "-Dnls=enabled" "-Ddevbindir=${placeholder ''dev''}/bin" ]; diff --git a/pkgs/development/libraries/libsoup/default.nix b/pkgs/development/libraries/libsoup/default.nix index a497661725b..9f4a5bac25b 100644 --- a/pkgs/development/libraries/libsoup/default.nix +++ b/pkgs/development/libraries/libsoup/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, glib, libxml2, meson, ninja, pkgconfig, gnome3 , gnomeSupport ? true, sqlite, glib-networking, gobject-introspection, vala -, libpsl, python3, brotli }: +, libpsl, python3, brotli, lib }: stdenv.mkDerivation rec { pname = "libsoup"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { "-Dtls_check=false" # glib-networking is a runtime dependency, not a compile-time dependency "-Dgssapi=disabled" "-Dvapi=enabled" - "-Dgnome=${if gnomeSupport then "true" else "false"}" + "-Dgnome=${lib.boolToString gnomeSupport}" "-Dntlm=disabled" ]; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index cf452fded14..756a6fd1508 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -129,7 +129,7 @@ stdenv.mkDerivation { "-Domx-libs-path=${placeholder "drivers"}/lib/bellagio" "-Dva-libs-path=${placeholder "drivers"}/lib/dri" "-Dd3d-drivers-path=${placeholder "drivers"}/lib/d3d" - "-Dgallium-nine=${if enableGalliumNine then "true" else "false"}" # Direct3D in Wine + "-Dgallium-nine=${boolToString enableGalliumNine}" # Direct3D in Wine "-Dosmesa=${if enableOSMesa then "gallium" else "none"}" # used by wine ] ++ optionals stdenv.isLinux [ "-Dglvnd=true" @@ -229,7 +229,7 @@ stdenv.mkDerivation { inherit (libglvnd) driverLink; }; - meta = with stdenv.lib; { + meta = { description = "An open source 3D graphics library"; longDescription = '' The Mesa project began as an open-source implementation of the OpenGL diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 60e856e61df..e6696626cb5 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { gnFlags = [ "use_custom_libcxx=false" - "is_clang=${if stdenv.cc.isClang then "true" else "false"}" + "is_clang=${lib.boolToString stdenv.cc.isClang}" "use_sysroot=false" # "use_system_icu=true" "is_component_build=false" diff --git a/pkgs/development/ocaml-modules/uchar/default.nix b/pkgs/development/ocaml-modules/uchar/default.nix index 819d8527b2a..fb56cca0f0a 100644 --- a/pkgs/development/ocaml-modules/uchar/default.nix +++ b/pkgs/development/ocaml-modules/uchar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true, lib }: stdenv.mkDerivation { name = "ocaml${ocaml.version}-uchar-0.0.2"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ ocaml ocamlbuild findlib ]; buildInputs = [ findlib ocaml ocamlbuild ]; - buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}"; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}"; installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR"; configurePlatforms = []; diff --git a/pkgs/os-specific/linux/dpdk/default.nix b/pkgs/os-specific/linux/dpdk/default.nix index aacbc3cdfbe..efe578c596b 100644 --- a/pkgs/os-specific/linux/dpdk/default.nix +++ b/pkgs/os-specific/linux/dpdk/default.nix @@ -43,7 +43,7 @@ in stdenv.mkDerivation rec { mesonFlags = [ "-Denable_docs=true" - "-Denable_kmods=${if mod then "true" else "false"}" + "-Denable_kmods=${lib.boolToString mod}" ] ++ lib.optional (!shared) "-Ddefault_library=static" ++ lib.optional stdenv.isx86_64 "-Dmachine=nehalem" diff --git a/pkgs/tools/networking/network-manager/libnma/default.nix b/pkgs/tools/networking/network-manager/libnma/default.nix index 7d7889f9a5b..d50ccc6517b 100644 --- a/pkgs/tools/networking/network-manager/libnma/default.nix +++ b/pkgs/tools/networking/network-manager/libnma/default.nix @@ -19,6 +19,7 @@ , gcr , glib , substituteAll +, lib }: stdenv.mkDerivation rec { @@ -61,7 +62,7 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dgcr=${if withGnome then "true" else "false"}" + "-Dgcr=${lib.boolToString withGnome}" ]; postPatch = '' -- cgit 1.4.1 From bc49a0815ae860010b4d593b02f00ab6f07d50ea Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 24 Nov 2020 10:29:28 -0500 Subject: utillinux: rename to util-linux --- nixos/lib/make-disk-image.nix | 4 +-- nixos/modules/config/swap.nix | 2 +- nixos/modules/config/system-path.nix | 2 +- nixos/modules/config/zram.nix | 4 +-- nixos/modules/installer/cd-dvd/sd-image.nix | 6 ++-- .../installer/cd-dvd/system-tarball-sheevaplug.nix | 2 +- nixos/modules/programs/x2goserver.nix | 2 +- nixos/modules/security/pam_mount.nix | 2 +- nixos/modules/security/wrappers/default.nix | 4 +-- nixos/modules/services/admin/salt/master.nix | 2 +- nixos/modules/services/admin/salt/minion.nix | 2 +- nixos/modules/services/backup/tarsnap.nix | 4 +-- .../services/cluster/kubernetes/kubelet.nix | 2 +- nixos/modules/services/computing/torque/mom.nix | 2 +- nixos/modules/services/computing/torque/server.nix | 2 +- .../continuous-integration/gitlab-runner.nix | 2 +- nixos/modules/services/databases/riak.nix | 2 +- .../services/desktops/profile-sync-daemon.nix | 4 +-- nixos/modules/services/hardware/udev.nix | 6 ++-- nixos/modules/services/misc/fstrim.nix | 2 +- nixos/modules/services/misc/gitlab.nix | 2 +- nixos/modules/services/misc/matrix-synapse.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 2 +- nixos/modules/services/monitoring/netdata.nix | 2 +- nixos/modules/services/monitoring/smartd.nix | 2 +- .../network-filesystems/openafs/client.nix | 2 +- .../services/network-filesystems/xtreemfs.nix | 6 ++-- .../modules/services/networking/networkmanager.nix | 2 +- .../networking/strongswan-swanctl/module.nix | 2 +- nixos/modules/services/networking/strongswan.nix | 2 +- nixos/modules/services/system/cloud-init.nix | 2 +- nixos/modules/services/torrent/transmission.nix | 6 ++-- nixos/modules/services/ttys/agetty.nix | 2 +- nixos/modules/services/web-apps/gerrit.nix | 2 +- .../services/web-servers/apache-httpd/default.nix | 4 +-- nixos/modules/services/x11/terminal-server.nix | 2 +- .../system/activation/activation-script.nix | 2 +- nixos/modules/system/activation/top-level.nix | 3 +- nixos/modules/system/boot/grow-partition.nix | 4 +-- nixos/modules/system/boot/loader/grub/grub.nix | 4 +-- nixos/modules/system/boot/shutdown.nix | 2 +- nixos/modules/system/boot/stage-1.nix | 6 ++-- nixos/modules/system/boot/stage-2.nix | 2 +- nixos/modules/tasks/filesystems.nix | 2 +- nixos/modules/tasks/filesystems/unionfs-fuse.nix | 6 ++-- nixos/modules/tasks/filesystems/zfs.nix | 2 +- nixos/modules/virtualisation/amazon-image.nix | 2 +- nixos/modules/virtualisation/azure-agent.nix | 2 +- nixos/modules/virtualisation/brightbox-image.nix | 2 +- nixos/modules/virtualisation/qemu-vm.nix | 2 +- nixos/modules/virtualisation/xen-dom0.nix | 4 +-- nixos/tests/os-prober.nix | 2 +- nixos/tests/systemd.nix | 2 +- nixos/tests/virtualbox.nix | 6 ++-- pkgs/applications/audio/clerk/default.nix | 4 +-- pkgs/applications/audio/strawberry/default.nix | 4 +-- pkgs/applications/audio/whipper/default.nix | 4 +-- pkgs/applications/blockchains/bitcoin-abc.nix | 4 +-- pkgs/applications/blockchains/bitcoin-classic.nix | 4 +-- pkgs/applications/blockchains/bitcoin-knots.nix | 4 +-- .../applications/blockchains/bitcoin-unlimited.nix | 4 +-- pkgs/applications/blockchains/bitcoin.nix | 4 +-- pkgs/applications/blockchains/dashpay.nix | 4 +-- pkgs/applications/blockchains/dogecoin.nix | 4 +-- pkgs/applications/blockchains/exodus/default.nix | 4 +-- pkgs/applications/blockchains/litecoin.nix | 4 +-- pkgs/applications/blockchains/pivx.nix | 4 +-- pkgs/applications/blockchains/zcash/default.nix | 4 +-- pkgs/applications/graphics/comical/default.nix | 4 +-- pkgs/applications/misc/clight/clightd.nix | 4 +-- pkgs/applications/misc/clipmenu/default.nix | 4 +-- pkgs/applications/misc/corectrl/default.nix | 4 +-- pkgs/applications/misc/imag/default.nix | 4 +-- pkgs/applications/misc/lutris/fhsenv.nix | 2 +- pkgs/applications/misc/multibootusb/default.nix | 4 +-- .../applications/misc/todoist-electron/default.nix | 4 +-- pkgs/applications/misc/udevil/default.nix | 8 +++--- pkgs/applications/misc/vifm/default.nix | 4 +-- .../networking/browsers/chromium/common.nix | 4 +-- .../networking/browsers/google-chrome/default.nix | 4 +-- .../browsers/ungoogled-chromium/common.nix | 4 +-- .../networking/cluster/k3s/default.nix | 4 +-- .../networking/cluster/openshift/default.nix | 2 +- .../cluster/spacegun/node-composition.nix | 2 +- pkgs/applications/networking/firehol/default.nix | 4 +-- .../matrix-recorder/composition.nix | 2 +- .../matrix-recorder/node-env.nix | 8 +++--- .../telegram/tdesktop/default.nix | 4 +-- .../instant-messengers/zoom-us/default.nix | 4 +-- .../networking/remote/x2goserver/default.nix | 4 +-- pkgs/applications/networking/testssl/default.nix | 4 +-- pkgs/applications/office/libreoffice/default.nix | 4 +-- pkgs/applications/office/softmaker/generic.nix | 4 +-- pkgs/applications/science/math/calc/default.nix | 4 +-- .../terminal-emulators/roxterm/default.nix | 4 +-- .../commitizen/node-composition.nix | 2 +- .../version-management/commitizen/node-env.nix | 8 +++--- .../version-management/git-and-tools/default.nix | 2 +- .../git-and-tools/git-recent/default.nix | 6 ++-- .../git-and-tools/hub/default.nix | 4 +-- .../git-and-tools/transcrypt/default.nix | 6 ++-- pkgs/applications/video/vcs/default.nix | 4 +-- pkgs/applications/video/vdr/plugins.nix | 4 +-- pkgs/applications/virtualization/OVMF/default.nix | 4 +-- .../virtualization/containerd/default.nix | 4 +-- pkgs/applications/virtualization/cri-o/wrapper.nix | 4 +-- .../applications/virtualization/docker/default.nix | 4 +-- .../applications/virtualization/podman/wrapper.nix | 4 +-- .../virtualization/singularity/default.nix | 4 +-- .../virtualization/virt-manager/qt.nix | 4 +-- pkgs/applications/virtualization/xen/generic.nix | 8 +++--- pkgs/build-support/docker/default.nix | 4 +-- pkgs/build-support/singularity-tools/default.nix | 4 +-- pkgs/build-support/vm/default.nix | 32 +++++++++++----------- pkgs/desktops/enlightenment/efl/default.nix | 4 +-- pkgs/desktops/plasma-5/discover.nix | 4 +-- pkgs/desktops/plasma-5/plasma-desktop/default.nix | 4 +-- .../compilers/elm/packages/node-composition.nix | 2 +- pkgs/development/compilers/osl/default.nix | 4 +-- .../haskell-modules/hackage-packages.nix | 6 ++-- pkgs/development/libraries/bobcat/default.nix | 4 +-- pkgs/development/libraries/glib/default.nix | 8 +++--- pkgs/development/libraries/gnutls/default.nix | 4 +-- pkgs/development/libraries/hyperscan/default.nix | 4 +-- pkgs/development/libraries/kpmcore/default.nix | 4 +-- pkgs/development/libraries/libblockdev/default.nix | 4 +-- pkgs/development/libraries/libndctl/default.nix | 4 +-- pkgs/development/libraries/libseccomp/default.nix | 4 +-- pkgs/development/libraries/libvirt/5.9.0.nix | 4 +-- pkgs/development/libraries/libvirt/default.nix | 4 +-- pkgs/development/libraries/libxsmm/default.nix | 4 +-- pkgs/development/libraries/speechd/default.nix | 4 +-- pkgs/development/libraries/volume-key/default.nix | 4 +-- .../development/misc/google-clasp/google-clasp.nix | 2 +- pkgs/development/mobile/abootimg/default.nix | 4 +-- pkgs/development/node-packages/composition.nix | 2 +- pkgs/development/node-packages/node-env.nix | 8 +++--- pkgs/development/python-modules/blivet/default.nix | 6 ++-- .../python-modules/coloredlogs/default.nix | 4 +-- .../python-modules/git-annex-adapter/default.nix | 4 +-- pkgs/development/python-modules/nuitka/default.nix | 2 +- .../development/python-modules/pytorch/default.nix | 4 +-- .../python-modules/supervise_api/default.nix | 4 +-- pkgs/development/python-modules/xlib/default.nix | 4 +-- pkgs/development/r-modules/generic-builder.nix | 4 +-- .../ruby-modules/gem-config/default.nix | 6 ++-- pkgs/development/tools/buildah/wrapper.nix | 4 +-- pkgs/development/tools/git-quick-stats/default.nix | 4 +-- pkgs/development/tools/halfempty/default.nix | 4 +-- pkgs/development/tools/misc/creduce/default.nix | 4 +-- .../tools/misc/usb-modeswitch/default.nix | 4 +-- pkgs/development/tools/misc/yodl/default.nix | 4 +-- pkgs/development/web/newman/node-composition.nix | 2 +- pkgs/development/web/newman/node-env.nix | 8 +++--- pkgs/development/web/nodejs/nodejs.nix | 4 +-- pkgs/development/web/remarkjs/nodepkgs.nix | 2 +- pkgs/games/unnethack/default.nix | 4 +-- pkgs/misc/base16-builder/node-packages.nix | 2 +- pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix | 4 +-- pkgs/misc/drivers/hplip/3.16.11.nix | 4 +-- pkgs/misc/drivers/hplip/3.18.5.nix | 4 +-- pkgs/misc/drivers/hplip/default.nix | 4 +-- pkgs/misc/emulators/cdemu/libmirage.nix | 4 +-- pkgs/misc/emulators/qmc2/default.nix | 4 +-- pkgs/misc/emulators/wine/staging.nix | 2 +- .../ms-vsliveshare-vsliveshare/default.nix | 4 +-- pkgs/os-specific/linux/displaylink/default.nix | 4 +-- pkgs/os-specific/linux/eudev/default.nix | 4 +-- pkgs/os-specific/linux/fuse/common.nix | 4 +-- pkgs/os-specific/linux/fuse/default.nix | 4 +-- .../linux/kernel/linux-hardkernel-4.14.nix | 2 +- pkgs/os-specific/linux/kernel/manual-config.nix | 2 +- pkgs/os-specific/linux/ldm/default.nix | 4 +-- pkgs/os-specific/linux/lvm2/default.nix | 2 +- pkgs/os-specific/linux/lxcfs/default.nix | 6 ++-- pkgs/os-specific/linux/mcelog/default.nix | 4 +-- pkgs/os-specific/linux/mdadm/default.nix | 4 +-- pkgs/os-specific/linux/nfs-utils/default.nix | 4 +-- pkgs/os-specific/linux/open-iscsi/default.nix | 4 +-- pkgs/os-specific/linux/openrazer/driver.nix | 4 +-- pkgs/os-specific/linux/openvswitch/default.nix | 4 +-- pkgs/os-specific/linux/openvswitch/lts.nix | 4 +-- pkgs/os-specific/linux/pam_mount/default.nix | 6 ++-- pkgs/os-specific/linux/pktgen/default.nix | 4 +-- pkgs/os-specific/linux/pm-utils/default.nix | 4 +-- pkgs/os-specific/linux/pmount/default.nix | 8 +++--- pkgs/os-specific/linux/prl-tools/default.nix | 4 +-- pkgs/os-specific/linux/systemd/default.nix | 16 +++++------ pkgs/os-specific/linux/tomb/default.nix | 4 +-- pkgs/os-specific/linux/udisks/1-default.nix | 4 +-- pkgs/os-specific/linux/udisks/2-default.nix | 6 ++-- pkgs/os-specific/linux/zfs/default.nix | 14 +++++----- pkgs/servers/apcupsd/default.nix | 4 +-- pkgs/servers/asterisk/default.nix | 4 +-- pkgs/servers/computing/torque/default.nix | 4 +-- pkgs/servers/hylafaxplus/default.nix | 4 +-- .../matrix-appservice-discord/node-composition.nix | 2 +- .../matrix-appservice-slack/node-composition.nix | 2 +- pkgs/servers/search/elasticsearch/6.x.nix | 6 ++-- pkgs/servers/search/elasticsearch/7.x.nix | 6 ++-- pkgs/servers/web-apps/cryptpad/node-packages.nix | 2 +- pkgs/servers/xmpp/ejabberd/default.nix | 4 +-- pkgs/servers/zigbee2mqtt/node.nix | 2 +- pkgs/servers/zoneminder/default.nix | 4 +-- pkgs/shells/bash/4.4.nix | 4 +-- pkgs/shells/bash/5.0.nix | 4 +-- pkgs/shells/fish/default.nix | 4 +-- pkgs/tools/X11/xpra/default.nix | 4 +-- pkgs/tools/archivers/fsarchiver/default.nix | 4 +-- pkgs/tools/backup/btrbk/default.nix | 4 +-- pkgs/tools/backup/duplicity/default.nix | 4 +-- pkgs/tools/backup/ori/default.nix | 4 +-- pkgs/tools/bluetooth/blueberry/default.nix | 8 +++--- pkgs/tools/cd-dvd/bashburn/default.nix | 6 ++-- pkgs/tools/cd-dvd/unetbootin/default.nix | 8 +++--- pkgs/tools/compression/pigz/default.nix | 4 +-- pkgs/tools/filesystems/bcache-tools/default.nix | 4 +-- pkgs/tools/filesystems/bees/default.nix | 7 +++-- pkgs/tools/filesystems/ceph/default.nix | 4 +-- pkgs/tools/filesystems/fatresize/default.nix | 6 ++-- pkgs/tools/filesystems/glusterfs/default.nix | 10 +++---- pkgs/tools/filesystems/nixpart/0.4/blivet.nix | 6 ++-- pkgs/tools/filesystems/nixpart/0.4/default.nix | 6 ++-- pkgs/tools/filesystems/nixpart/0.4/lvm2.nix | 4 +-- pkgs/tools/filesystems/nixpart/0.4/parted.nix | 4 +-- pkgs/tools/filesystems/ntfs-3g/default.nix | 6 ++-- pkgs/tools/misc/calamares/default.nix | 4 +-- pkgs/tools/misc/cloud-utils/default.nix | 4 +-- pkgs/tools/misc/debootstrap/default.nix | 4 +-- pkgs/tools/misc/etcher/default.nix | 4 +-- pkgs/tools/misc/gparted/default.nix | 4 +-- pkgs/tools/misc/memtest86-efi/default.nix | 4 +-- pkgs/tools/misc/ostree/default.nix | 4 +-- pkgs/tools/misc/parted/default.nix | 4 +-- pkgs/tools/misc/partition-manager/default.nix | 4 +-- pkgs/tools/misc/profile-sync-daemon/default.nix | 4 +-- pkgs/tools/misc/rmlint/default.nix | 6 ++-- pkgs/tools/misc/rpm-ostree/default.nix | 4 +-- pkgs/tools/misc/snapper/default.nix | 4 +-- pkgs/tools/misc/tlp/default.nix | 4 +-- pkgs/tools/misc/woeusb/default.nix | 4 +-- pkgs/tools/misc/xfstests/default.nix | 4 +-- pkgs/tools/misc/xvfb-run/default.nix | 4 +-- pkgs/tools/networking/airfield/node.nix | 2 +- pkgs/tools/networking/bud/default.nix | 4 +-- pkgs/tools/networking/cjdns/default.nix | 4 +-- pkgs/tools/networking/openvpn/default.nix | 4 +-- .../networking/openvpn/openvpn_learnaddress.nix | 6 ++-- .../networking/openvpn/update-systemd-resolved.nix | 4 +-- pkgs/tools/networking/shorewall/default.nix | 6 ++-- pkgs/tools/networking/tgt/default.nix | 2 +- pkgs/tools/package-management/nixui/nixui.nix | 2 +- pkgs/tools/security/ecryptfs/default.nix | 6 ++-- pkgs/tools/security/pass/rofi-pass.nix | 4 +-- pkgs/tools/security/scrypt/default.nix | 4 +-- pkgs/tools/system/facter/default.nix | 4 +-- pkgs/tools/system/inxi/default.nix | 4 +-- pkgs/tools/system/rofi-systemd/default.nix | 4 +-- .../alpine-make-vm-image/default.nix | 4 +-- .../google-compute-engine/default.nix | 8 +++--- .../virtualization/nixos-container/default.nix | 4 +-- pkgs/top-level/aliases.nix | 3 +- pkgs/top-level/all-packages.nix | 30 ++++++++++---------- pkgs/top-level/release-small.nix | 4 +-- pkgs/top-level/unix-tools.nix | 32 +++++++++++----------- 265 files changed, 574 insertions(+), 571 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index a4a488a1b3e..0ad0cf1fef5 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -134,7 +134,7 @@ let format' = format; in let binPath = with pkgs; makeBinPath ( [ rsync - utillinux + util-linux parted e2fsprogs lkl @@ -239,7 +239,7 @@ let format' = format; in let in pkgs.vmTools.runInLinuxVM ( pkgs.runCommand name { preVM = prepareImage; - buildInputs = with pkgs; [ utillinux e2fsprogs dosfstools ]; + buildInputs = with pkgs; [ util-linux e2fsprogs dosfstools ]; postVM = '' ${if format == "raw" then '' mv $diskImage $out/${filename} diff --git a/nixos/modules/config/swap.nix b/nixos/modules/config/swap.nix index adb4e229421..4bb66e9b514 100644 --- a/nixos/modules/config/swap.nix +++ b/nixos/modules/config/swap.nix @@ -187,7 +187,7 @@ in before = [ "${realDevice'}.swap" ]; # If swap is encrypted, depending on rngd resolves a possible entropy starvation during boot after = mkIf (config.security.rngd.enable && sw.randomEncryption.enable) [ "rngd.service" ]; - path = [ pkgs.utillinux ] ++ optional sw.randomEncryption.enable pkgs.cryptsetup; + path = [ pkgs.util-linux ] ++ optional sw.randomEncryption.enable pkgs.cryptsetup; script = '' diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index c65fa1a684f..27d1cef849b 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -37,7 +37,7 @@ let pkgs.procps pkgs.su pkgs.time - pkgs.utillinux + pkgs.util-linux pkgs.which pkgs.zstd ]; diff --git a/nixos/modules/config/zram.nix b/nixos/modules/config/zram.nix index 5e9870bf6b1..341101bc184 100644 --- a/nixos/modules/config/zram.nix +++ b/nixos/modules/config/zram.nix @@ -149,8 +149,8 @@ in print int($2*${toString cfg.memoryPercent}/100.0/${toString devicesCount}*1024) }' /proc/meminfo) - ${pkgs.utillinux}/sbin/zramctl --size $mem --algorithm ${cfg.algorithm} /dev/${dev} - ${pkgs.utillinux}/sbin/mkswap /dev/${dev} + ${pkgs.util-linux}/sbin/zramctl --size $mem --algorithm ${cfg.algorithm} /dev/${dev} + ${pkgs.util-linux}/sbin/mkswap /dev/${dev} ''; restartIfChanged = false; }; diff --git a/nixos/modules/installer/cd-dvd/sd-image.nix b/nixos/modules/installer/cd-dvd/sd-image.nix index 231c7bf0a6c..d9799aa69c9 100644 --- a/nixos/modules/installer/cd-dvd/sd-image.nix +++ b/nixos/modules/installer/cd-dvd/sd-image.nix @@ -147,10 +147,10 @@ in sdImage.storePaths = [ config.system.build.toplevel ]; system.build.sdImage = pkgs.callPackage ({ stdenv, dosfstools, e2fsprogs, - mtools, libfaketime, utillinux, zstd }: stdenv.mkDerivation { + mtools, libfaketime, util-linux, zstd }: stdenv.mkDerivation { name = config.sdImage.imageName; - nativeBuildInputs = [ dosfstools e2fsprogs mtools libfaketime utillinux zstd ]; + nativeBuildInputs = [ dosfstools e2fsprogs mtools libfaketime util-linux zstd ]; inherit (config.sdImage) compressImage; @@ -221,7 +221,7 @@ in set -euo pipefail set -x # Figure out device names for the boot device and root filesystem. - rootPart=$(${pkgs.utillinux}/bin/findmnt -n -o SOURCE /) + rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /) bootDevice=$(lsblk -npo PKNAME $rootPart) # Resize the root partition and the filesystem to fit the disk diff --git a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix index 8408f56f94f..0e67ae7de69 100644 --- a/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix +++ b/nixos/modules/installer/cd-dvd/system-tarball-sheevaplug.nix @@ -96,7 +96,7 @@ in boot.initrd.extraUtilsCommands = '' - copy_bin_and_libs ${pkgs.utillinux}/sbin/hwclock + copy_bin_and_libs ${pkgs.util-linux}/sbin/hwclock ''; boot.initrd.postDeviceCommands = diff --git a/nixos/modules/programs/x2goserver.nix b/nixos/modules/programs/x2goserver.nix index 7d74231e956..05707a56542 100644 --- a/nixos/modules/programs/x2goserver.nix +++ b/nixos/modules/programs/x2goserver.nix @@ -110,7 +110,7 @@ in { "L+ /usr/local/bin/chmod - - - - ${coreutils}/bin/chmod" "L+ /usr/local/bin/cp - - - - ${coreutils}/bin/cp" "L+ /usr/local/bin/sed - - - - ${gnused}/bin/sed" - "L+ /usr/local/bin/setsid - - - - ${utillinux}/bin/setsid" + "L+ /usr/local/bin/setsid - - - - ${util-linux}/bin/setsid" "L+ /usr/local/bin/xrandr - - - - ${xorg.xrandr}/bin/xrandr" "L+ /usr/local/bin/xmodmap - - - - ${xorg.xmodmap}/bin/xmodmap" ]; diff --git a/nixos/modules/security/pam_mount.nix b/nixos/modules/security/pam_mount.nix index 89211bfbde4..9a0143c155c 100644 --- a/nixos/modules/security/pam_mount.nix +++ b/nixos/modules/security/pam_mount.nix @@ -60,7 +60,7 @@ in - ${pkgs.utillinux}/bin + ${pkgs.util-linux}/bin diff --git a/nixos/modules/security/wrappers/default.nix b/nixos/modules/security/wrappers/default.nix index 52de21bca9b..de6213714ac 100644 --- a/nixos/modules/security/wrappers/default.nix +++ b/nixos/modules/security/wrappers/default.nix @@ -163,8 +163,8 @@ in # These are mount related wrappers that require the +s permission. fusermount.source = "${pkgs.fuse}/bin/fusermount"; fusermount3.source = "${pkgs.fuse3}/bin/fusermount3"; - mount.source = "${lib.getBin pkgs.utillinux}/bin/mount"; - umount.source = "${lib.getBin pkgs.utillinux}/bin/umount"; + mount.source = "${lib.getBin pkgs.util-linux}/bin/mount"; + umount.source = "${lib.getBin pkgs.util-linux}/bin/umount"; }; boot.specialFileSystems.${parentWrapperDir} = { diff --git a/nixos/modules/services/admin/salt/master.nix b/nixos/modules/services/admin/salt/master.nix index cb803d323bb..a3069c81c19 100644 --- a/nixos/modules/services/admin/salt/master.nix +++ b/nixos/modules/services/admin/salt/master.nix @@ -45,7 +45,7 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; path = with pkgs; [ - utillinux # for dmesg + util-linux # for dmesg ]; serviceConfig = { ExecStart = "${pkgs.salt}/bin/salt-master"; diff --git a/nixos/modules/services/admin/salt/minion.nix b/nixos/modules/services/admin/salt/minion.nix index c8fa9461a20..ac124c570d8 100644 --- a/nixos/modules/services/admin/salt/minion.nix +++ b/nixos/modules/services/admin/salt/minion.nix @@ -50,7 +50,7 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; path = with pkgs; [ - utillinux + util-linux ]; serviceConfig = { ExecStart = "${pkgs.salt}/bin/salt-minion"; diff --git a/nixos/modules/services/backup/tarsnap.nix b/nixos/modules/services/backup/tarsnap.nix index 6d99a1efb61..e1200731c2c 100644 --- a/nixos/modules/services/backup/tarsnap.nix +++ b/nixos/modules/services/backup/tarsnap.nix @@ -308,7 +308,7 @@ in requires = [ "network-online.target" ]; after = [ "network-online.target" ]; - path = with pkgs; [ iputils tarsnap utillinux ]; + path = with pkgs; [ iputils tarsnap util-linux ]; # In order for the persistent tarsnap timer to work reliably, we have to # make sure that the tarsnap server is reachable after systemd starts up @@ -355,7 +355,7 @@ in description = "Tarsnap restore '${name}'"; requires = [ "network-online.target" ]; - path = with pkgs; [ iputils tarsnap utillinux ]; + path = with pkgs; [ iputils tarsnap util-linux ]; script = let tarsnap = ''tarsnap --configfile "/etc/tarsnap/${name}.conf"''; diff --git a/nixos/modules/services/cluster/kubernetes/kubelet.nix b/nixos/modules/services/cluster/kubernetes/kubelet.nix index c3d67552cc8..2b6e45ba1b9 100644 --- a/nixos/modules/services/cluster/kubernetes/kubelet.nix +++ b/nixos/modules/services/cluster/kubernetes/kubelet.nix @@ -241,7 +241,7 @@ in description = "Kubernetes Kubelet Service"; wantedBy = [ "kubernetes.target" ]; after = [ "network.target" "docker.service" "kube-apiserver.service" ]; - path = with pkgs; [ gitMinimal openssh docker utillinux iproute ethtool thin-provisioning-tools iptables socat ] ++ top.path; + path = with pkgs; [ gitMinimal openssh docker util-linux iproute ethtool thin-provisioning-tools iptables socat ] ++ top.path; preStart = '' ${concatMapStrings (img: '' echo "Seeding docker image: ${img}" diff --git a/nixos/modules/services/computing/torque/mom.nix b/nixos/modules/services/computing/torque/mom.nix index 0c5f43cf3e6..6747bd4b0d5 100644 --- a/nixos/modules/services/computing/torque/mom.nix +++ b/nixos/modules/services/computing/torque/mom.nix @@ -32,7 +32,7 @@ in environment.systemPackages = [ pkgs.torque ]; systemd.services.torque-mom-init = { - path = with pkgs; [ torque utillinux procps inetutils ]; + path = with pkgs; [ torque util-linux procps inetutils ]; script = '' pbs_mkdirs -v aux diff --git a/nixos/modules/services/computing/torque/server.nix b/nixos/modules/services/computing/torque/server.nix index 21c5a4f4672..8d923fc04d4 100644 --- a/nixos/modules/services/computing/torque/server.nix +++ b/nixos/modules/services/computing/torque/server.nix @@ -21,7 +21,7 @@ in environment.systemPackages = [ pkgs.torque ]; systemd.services.torque-server-init = { - path = with pkgs; [ torque utillinux procps inetutils ]; + path = with pkgs; [ torque util-linux procps inetutils ]; script = '' tmpsetup=$(mktemp -t torque-XXXX) diff --git a/nixos/modules/services/continuous-integration/gitlab-runner.nix b/nixos/modules/services/continuous-integration/gitlab-runner.nix index 431555309cc..c358a5db77c 100644 --- a/nixos/modules/services/continuous-integration/gitlab-runner.nix +++ b/nixos/modules/services/continuous-integration/gitlab-runner.nix @@ -541,7 +541,7 @@ in jq moreutils remarshal - utillinux + util-linux cfg.package ] ++ cfg.extraPackages; reloadIfChanged = true; diff --git a/nixos/modules/services/databases/riak.nix b/nixos/modules/services/databases/riak.nix index 885215209bd..657eeea87bf 100644 --- a/nixos/modules/services/databases/riak.nix +++ b/nixos/modules/services/databases/riak.nix @@ -118,7 +118,7 @@ in after = [ "network.target" ]; path = [ - pkgs.utillinux # for `logger` + pkgs.util-linux # for `logger` pkgs.bash ]; diff --git a/nixos/modules/services/desktops/profile-sync-daemon.nix b/nixos/modules/services/desktops/profile-sync-daemon.nix index a8ac22ac127..6206295272f 100644 --- a/nixos/modules/services/desktops/profile-sync-daemon.nix +++ b/nixos/modules/services/desktops/profile-sync-daemon.nix @@ -36,7 +36,7 @@ in { description = "Profile Sync daemon"; wants = [ "psd-resync.service" ]; wantedBy = [ "default.target" ]; - path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ]; + path = with pkgs; [ rsync kmod gawk nettools util-linux profile-sync-daemon ]; unitConfig = { RequiresMountsFor = [ "/home/" ]; }; @@ -55,7 +55,7 @@ in { wants = [ "psd-resync.timer" ]; partOf = [ "psd.service" ]; wantedBy = [ "default.target" ]; - path = with pkgs; [ rsync kmod gawk nettools utillinux profile-sync-daemon ]; + path = with pkgs; [ rsync kmod gawk nettools util-linux profile-sync-daemon ]; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon resync"; diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 587b9b0234a..a212adb7342 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -57,8 +57,8 @@ let substituteInPlace $i \ --replace \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \ --replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \ - --replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \ - --replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \ + --replace \"/sbin/blkid \"${pkgs.util-linux}/sbin/blkid \ + --replace \"/bin/mount \"${pkgs.util-linux}/bin/mount \ --replace /usr/bin/readlink ${pkgs.coreutils}/bin/readlink \ --replace /usr/bin/basename ${pkgs.coreutils}/bin/basename done @@ -280,7 +280,7 @@ in services.udev.packages = [ extraUdevRules extraHwdbFile ]; - services.udev.path = [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.utillinux udev ]; + services.udev.path = [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.util-linux udev ]; boot.kernelParams = mkIf (!config.networking.usePredictableInterfaceNames) [ "net.ifnames=0" ]; diff --git a/nixos/modules/services/misc/fstrim.nix b/nixos/modules/services/misc/fstrim.nix index b8841a7fe74..5258f5acb41 100644 --- a/nixos/modules/services/misc/fstrim.nix +++ b/nixos/modules/services/misc/fstrim.nix @@ -31,7 +31,7 @@ in { config = mkIf cfg.enable { - systemd.packages = [ pkgs.utillinux ]; + systemd.packages = [ pkgs.util-linux ]; systemd.timers.fstrim = { timerConfig = { diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index c4037b49e7e..93420399279 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -658,7 +658,7 @@ in { script = '' set -eu - PSQL="${pkgs.utillinux}/bin/runuser -u ${pgsql.superUser} -- psql --port=${toString pgsql.port}" + PSQL="${pkgs.util-linux}/bin/runuser -u ${pgsql.superUser} -- psql --port=${toString pgsql.port}" $PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${cfg.databaseName}'" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE "${cfg.databaseName}" OWNER "${cfg.databaseUsername}"' current_owner=$($PSQL -tAc "SELECT pg_catalog.pg_get_userbyid(datdba) FROM pg_catalog.pg_database WHERE datname = '${cfg.databaseName}'") diff --git a/nixos/modules/services/misc/matrix-synapse.nix b/nixos/modules/services/misc/matrix-synapse.nix index 7f42184735c..3abb9b7d69c 100644 --- a/nixos/modules/services/misc/matrix-synapse.nix +++ b/nixos/modules/services/misc/matrix-synapse.nix @@ -713,7 +713,7 @@ in { ${ concatMapStringsSep "\n " (x: "--config-path ${x} \\") ([ configFile ] ++ cfg.extraConfigFiles) } --keys-directory ${cfg.dataDir} ''; - ExecReload = "${pkgs.utillinux}/bin/kill -HUP $MAINPID"; + ExecReload = "${pkgs.util-linux}/bin/kill -HUP $MAINPID"; Restart = "on-failure"; }; }; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index ed05882a634..0eeff31d6c4 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -539,7 +539,7 @@ in systemd.sockets.nix-daemon.wantedBy = [ "sockets.target" ]; systemd.services.nix-daemon = - { path = [ nix pkgs.utillinux config.programs.ssh.package ] + { path = [ nix pkgs.util-linux config.programs.ssh.package ] ++ optionals cfg.distributedBuilds [ pkgs.gzip ]; environment = cfg.envVars diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix index 2e73e15d3a8..db51fdbd2c6 100644 --- a/nixos/modules/services/monitoring/netdata.nix +++ b/nixos/modules/services/monitoring/netdata.nix @@ -142,7 +142,7 @@ in { serviceConfig = { Environment="PYTHONPATH=${cfg.package}/libexec/netdata/python.d/python_modules"; ExecStart = "${cfg.package}/bin/netdata -P /run/netdata/netdata.pid -D -c ${configFile}"; - ExecReload = "${pkgs.utillinux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID"; + ExecReload = "${pkgs.util-linux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID"; TimeoutStopSec = 60; Restart = "on-failure"; # User and group diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix index c72b4abfcdc..3ea25437114 100644 --- a/nixos/modules/services/monitoring/smartd.nix +++ b/nixos/modules/services/monitoring/smartd.nix @@ -36,7 +36,7 @@ let $SMARTD_MESSAGE EOF - } | ${pkgs.utillinux}/bin/wall 2>/dev/null + } | ${pkgs.util-linux}/bin/wall 2>/dev/null ''} ${optionalString nx.enable '' export DISPLAY=${nx.display} diff --git a/nixos/modules/services/network-filesystems/openafs/client.nix b/nixos/modules/services/network-filesystems/openafs/client.nix index 677111814a0..03884cb7297 100644 --- a/nixos/modules/services/network-filesystems/openafs/client.nix +++ b/nixos/modules/services/network-filesystems/openafs/client.nix @@ -244,7 +244,7 @@ in # postStop, then we get a hang + kernel oops, because AFS can't be # stopped simply by sending signals to processes. preStop = '' - ${pkgs.utillinux}/bin/umount ${cfg.mountPoint} + ${pkgs.util-linux}/bin/umount ${cfg.mountPoint} ${openafsBin}/sbin/afsd -shutdown ${pkgs.kmod}/sbin/rmmod libafs ''; diff --git a/nixos/modules/services/network-filesystems/xtreemfs.nix b/nixos/modules/services/network-filesystems/xtreemfs.nix index b8f8c1d7117..27a9fe847c5 100644 --- a/nixos/modules/services/network-filesystems/xtreemfs.nix +++ b/nixos/modules/services/network-filesystems/xtreemfs.nix @@ -112,7 +112,7 @@ in description = '' Must be set to a unique identifier, preferably a UUID according to RFC 4122. UUIDs can be generated with `uuidgen` command, found in - the `utillinux` package. + the `util-linux` package. ''; }; port = mkOption { @@ -232,7 +232,7 @@ in description = '' Must be set to a unique identifier, preferably a UUID according to RFC 4122. UUIDs can be generated with `uuidgen` command, found in - the `utillinux` package. + the `util-linux` package. ''; }; port = mkOption { @@ -370,7 +370,7 @@ in description = '' Must be set to a unique identifier, preferably a UUID according to RFC 4122. UUIDs can be generated with `uuidgen` command, found in - the `utillinux` package. + the `util-linux` package. ''; }; port = mkOption { diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 201a51ff70b..2e680544ec2 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -465,7 +465,7 @@ in { restartTriggers = [ configFile overrideNameserversScript ]; # useful binaries for user-specified hooks - path = [ pkgs.iproute pkgs.utillinux pkgs.coreutils ]; + path = [ pkgs.iproute pkgs.util-linux pkgs.coreutils ]; aliases = [ "dbus-org.freedesktop.nm-dispatcher.service" ]; }; diff --git a/nixos/modules/services/networking/strongswan-swanctl/module.nix b/nixos/modules/services/networking/strongswan-swanctl/module.nix index 0fec3ef00ad..f67eedac296 100644 --- a/nixos/modules/services/networking/strongswan-swanctl/module.nix +++ b/nixos/modules/services/networking/strongswan-swanctl/module.nix @@ -63,7 +63,7 @@ in { description = "strongSwan IPsec IKEv1/IKEv2 daemon using swanctl"; wantedBy = [ "multi-user.target" ]; after = [ "network-online.target" ]; - path = with pkgs; [ kmod iproute iptables utillinux ]; + path = with pkgs; [ kmod iproute iptables util-linux ]; environment = { STRONGSWAN_CONF = pkgs.writeTextFile { name = "strongswan.conf"; diff --git a/nixos/modules/services/networking/strongswan.nix b/nixos/modules/services/networking/strongswan.nix index 13a1a897c5e..f6170b81365 100644 --- a/nixos/modules/services/networking/strongswan.nix +++ b/nixos/modules/services/networking/strongswan.nix @@ -152,7 +152,7 @@ in systemd.services.strongswan = { description = "strongSwan IPSec Service"; wantedBy = [ "multi-user.target" ]; - path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux + path = with pkgs; [ kmod iproute iptables util-linux ]; # XXX Linux after = [ "network-online.target" ]; environment = { STRONGSWAN_CONF = strongswanConf { inherit setup connections ca secretsFile managePlugins enabledPlugins; }; diff --git a/nixos/modules/services/system/cloud-init.nix b/nixos/modules/services/system/cloud-init.nix index 15fe822aec6..3518e0ee9dc 100644 --- a/nixos/modules/services/system/cloud-init.nix +++ b/nixos/modules/services/system/cloud-init.nix @@ -9,7 +9,7 @@ let cfg = config.services.cloud-init; nettools openssh shadow - utillinux + util-linux ] ++ optional cfg.btrfs.enable btrfs-progs ++ optional cfg.ext4.enable e2fsprogs ; diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index 717c18d367f..7bec073e26f 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -397,9 +397,9 @@ in mr ${getLib pkgs.openssl}/lib/libcrypto*.so*, mr ${getLib pkgs.openssl}/lib/libssl*.so*, mr ${getLib pkgs.systemd}/lib/libsystemd*.so*, - mr ${getLib pkgs.utillinuxMinimal.out}/lib/libblkid.so*, - mr ${getLib pkgs.utillinuxMinimal.out}/lib/libmount.so*, - mr ${getLib pkgs.utillinuxMinimal.out}/lib/libuuid.so*, + mr ${getLib pkgs.util-linuxMinimal.out}/lib/libblkid.so*, + mr ${getLib pkgs.util-linuxMinimal.out}/lib/libmount.so*, + mr ${getLib pkgs.util-linuxMinimal.out}/lib/libuuid.so*, mr ${getLib pkgs.xz}/lib/liblzma*.so*, mr ${getLib pkgs.zlib}/lib/libz*.so*, diff --git a/nixos/modules/services/ttys/agetty.nix b/nixos/modules/services/ttys/agetty.nix index f3a629f7af7..d07746be237 100644 --- a/nixos/modules/services/ttys/agetty.nix +++ b/nixos/modules/services/ttys/agetty.nix @@ -5,7 +5,7 @@ with lib; let autologinArg = optionalString (config.services.mingetty.autologinUser != null) "--autologin ${config.services.mingetty.autologinUser}"; - gettyCmd = extraArgs: "@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login ${autologinArg} ${extraArgs}"; + gettyCmd = extraArgs: "@${pkgs.util-linux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login ${autologinArg} ${extraArgs}"; in diff --git a/nixos/modules/services/web-apps/gerrit.nix b/nixos/modules/services/web-apps/gerrit.nix index 657b1a4fc5b..864587aea56 100644 --- a/nixos/modules/services/web-apps/gerrit.nix +++ b/nixos/modules/services/web-apps/gerrit.nix @@ -143,7 +143,7 @@ in Set a UUID that uniquely identifies the server. This can be generated with - nix-shell -p utillinux --run uuidgen. + nix-shell -p util-linux --run uuidgen. ''; }; }; diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 6ffda3d6361..dc78728d663 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -750,8 +750,8 @@ in # Get rid of old semaphores. These tend to accumulate across # server restarts, eventually preventing it from restarting # successfully. - for i in $(${pkgs.utillinux}/bin/ipcs -s | grep ' ${cfg.user} ' | cut -f2 -d ' '); do - ${pkgs.utillinux}/bin/ipcrm -s $i + for i in $(${pkgs.util-linux}/bin/ipcs -s | grep ' ${cfg.user} ' | cut -f2 -d ' '); do + ${pkgs.util-linux}/bin/ipcrm -s $i done ''; diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix index 503c14c9b62..e6b50c21a95 100644 --- a/nixos/modules/services/x11/terminal-server.nix +++ b/nixos/modules/services/x11/terminal-server.nix @@ -32,7 +32,7 @@ with lib; path = [ pkgs.xorg.xorgserver.out pkgs.gawk pkgs.which pkgs.openssl pkgs.xorg.xauth - pkgs.nettools pkgs.shadow pkgs.procps pkgs.utillinux pkgs.bash + pkgs.nettools pkgs.shadow pkgs.procps pkgs.util-linux pkgs.bash ]; environment.FD_GEOM = "1024x786x24"; diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index 18c77948cb9..3a6930314b1 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -25,7 +25,7 @@ let stdenv.cc.libc # nscd in update-users-groups.pl shadow nettools # needed for hostname - utillinux # needed for mount and mountpoint + util-linux # needed for mount and mountpoint ]; scriptType = with types; diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 2724d9f9cb6..03d7e749323 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -97,10 +97,11 @@ let allowSubstitutes = false; buildCommand = systemBuilder; - inherit (pkgs) utillinux coreutils; + inherit (pkgs) coreutils; systemd = config.systemd.package; shell = "${pkgs.bash}/bin/sh"; su = "${pkgs.shadow.su}/bin/su"; + utillinux = pkgs.util-linux; kernelParams = config.boot.kernelParams; installBootLoader = diff --git a/nixos/modules/system/boot/grow-partition.nix b/nixos/modules/system/boot/grow-partition.nix index be70c4ad9c8..87c981b24ce 100644 --- a/nixos/modules/system/boot/grow-partition.nix +++ b/nixos/modules/system/boot/grow-partition.nix @@ -20,8 +20,8 @@ with lib; boot.initrd.extraUtilsCommands = '' copy_bin_and_libs ${pkgs.gawk}/bin/gawk copy_bin_and_libs ${pkgs.gnused}/bin/sed - copy_bin_and_libs ${pkgs.utillinux}/sbin/sfdisk - copy_bin_and_libs ${pkgs.utillinux}/sbin/lsblk + copy_bin_and_libs ${pkgs.util-linux}/sbin/sfdisk + copy_bin_and_libs ${pkgs.util-linux}/sbin/lsblk substitute "${pkgs.cloud-utils.guest}/bin/.growpart-wrapped" "$out/bin/growpart" \ --replace "${pkgs.bash}/bin/sh" "/bin/sh" \ diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 20e39628eab..09f7641dc9d 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -66,7 +66,7 @@ let extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels default fsIdentifier efiSupport efiInstallAsRemovable gfxmodeEfi gfxmodeBios gfxpayloadEfi gfxpayloadBios; path = with pkgs; makeBinPath ( - [ coreutils gnused gnugrep findutils diffutils btrfs-progs utillinux mdadm ] + [ coreutils gnused gnugrep findutils diffutils btrfs-progs util-linux mdadm ] ++ optional (cfg.efiSupport && (cfg.version == 2)) efibootmgr ++ optionals cfg.useOSProber [ busybox os-prober ]); font = if cfg.font == null then "" @@ -705,7 +705,7 @@ in let install-grub-pl = pkgs.substituteAll { src = ./install-grub.pl; - inherit (pkgs) utillinux; + utillinux = pkgs.util-linux; btrfsprogs = pkgs.btrfs-progs; }; in pkgs.writeScript "install-grub.sh" ('' diff --git a/nixos/modules/system/boot/shutdown.nix b/nixos/modules/system/boot/shutdown.nix index 11041066e07..8cda7b3aabe 100644 --- a/nixos/modules/system/boot/shutdown.nix +++ b/nixos/modules/system/boot/shutdown.nix @@ -18,7 +18,7 @@ with lib; serviceConfig = { Type = "oneshot"; - ExecStart = "${pkgs.utillinux}/sbin/hwclock --systohc ${if config.time.hardwareClockInLocalTime then "--localtime" else "--utc"}"; + ExecStart = "${pkgs.util-linux}/sbin/hwclock --systohc ${if config.time.hardwareClockInLocalTime then "--localtime" else "--utc"}"; }; }; diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 6823e12847c..0f5787a1921 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -107,8 +107,8 @@ let copy_bin_and_libs $BIN done - # Copy some utillinux stuff. - copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid + # Copy some util-linux stuff. + copy_bin_and_libs ${pkgs.util-linux}/sbin/blkid # Copy dmsetup and lvm. copy_bin_and_libs ${getBin pkgs.lvm2}/bin/dmsetup @@ -235,7 +235,7 @@ let --replace scsi_id ${extraUtils}/bin/scsi_id \ --replace cdrom_id ${extraUtils}/bin/cdrom_id \ --replace ${pkgs.coreutils}/bin/basename ${extraUtils}/bin/basename \ - --replace ${pkgs.utillinux}/bin/blkid ${extraUtils}/bin/blkid \ + --replace ${pkgs.util-linux}/bin/blkid ${extraUtils}/bin/blkid \ --replace ${getBin pkgs.lvm2}/bin ${extraUtils}/bin \ --replace ${pkgs.mdadm}/sbin ${extraUtils}/sbin \ --replace ${pkgs.bash}/bin/sh ${extraUtils}/bin/sh \ diff --git a/nixos/modules/system/boot/stage-2.nix b/nixos/modules/system/boot/stage-2.nix index dd6d83ee009..94bc34fea0d 100644 --- a/nixos/modules/system/boot/stage-2.nix +++ b/nixos/modules/system/boot/stage-2.nix @@ -17,7 +17,7 @@ let inherit (config.system.build) earlyMountScript; path = lib.makeBinPath ([ pkgs.coreutils - pkgs.utillinux + pkgs.util-linux ] ++ lib.optional useHostResolvConf pkgs.openresolv); fsPackagesPath = lib.makeBinPath config.system.fsPackages; postBootCommands = pkgs.writeText "local-cmds" diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 3ea67dac714..a055072f9c9 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -286,7 +286,7 @@ in before = [ mountPoint' "systemd-fsck@${device'}.service" ]; requires = [ device'' ]; after = [ device'' ]; - path = [ pkgs.utillinux ] ++ config.system.fsPackages; + path = [ pkgs.util-linux ] ++ config.system.fsPackages; script = '' if ! [ -e "${fs.device}" ]; then exit 1; fi diff --git a/nixos/modules/tasks/filesystems/unionfs-fuse.nix b/nixos/modules/tasks/filesystems/unionfs-fuse.nix index 1dcc4c87e3c..f54f3559c34 100644 --- a/nixos/modules/tasks/filesystems/unionfs-fuse.nix +++ b/nixos/modules/tasks/filesystems/unionfs-fuse.nix @@ -18,9 +18,9 @@ boot.initrd.postDeviceCommands = '' # Hacky!!! fuse hard-codes the path to mount - mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}-bin/bin - ln -s $(which mount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}-bin/bin - ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}-bin/bin + mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.util-linux.name}-bin/bin + ln -s $(which mount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.util-linux.name}-bin/bin + ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.util-linux.name}-bin/bin ''; }) diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 7b6c2277741..6becc696273 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -440,7 +440,7 @@ in pkgs.gnugrep pkgs.gnused pkgs.nettools - pkgs.utillinux + pkgs.util-linux ]; }; diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix index 819e93a43e5..26297a7d0f1 100644 --- a/nixos/modules/virtualisation/amazon-image.nix +++ b/nixos/modules/virtualisation/amazon-image.nix @@ -124,7 +124,7 @@ in boot.initrd.extraUtilsCommands = '' # We need swapon in the initrd. - copy_bin_and_libs ${pkgs.utillinux}/sbin/swapon + copy_bin_and_libs ${pkgs.util-linux}/sbin/swapon ''; # Don't put old configurations in the GRUB menu. The user has no diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index e85482af839..81413792eda 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -22,7 +22,7 @@ let nettools # for hostname procps # for pidof shadow # for useradd, usermod - utillinux # for (u)mount, fdisk, sfdisk, mkswap + util-linux # for (u)mount, fdisk, sfdisk, mkswap parted ]; pythonPath = [ pythonPackages.pyasn1 ]; diff --git a/nixos/modules/virtualisation/brightbox-image.nix b/nixos/modules/virtualisation/brightbox-image.nix index d0efbcc808a..4498e3a7361 100644 --- a/nixos/modules/virtualisation/brightbox-image.nix +++ b/nixos/modules/virtualisation/brightbox-image.nix @@ -27,7 +27,7 @@ in popd ''; diskImageBase = "nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw"; - buildInputs = [ pkgs.utillinux pkgs.perl ]; + buildInputs = [ pkgs.util-linux pkgs.perl ]; exportReferencesGraph = [ "closure" config.system.build.toplevel ]; } diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 33da920e94c..447d1f091c8 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -190,7 +190,7 @@ let '' else '' ''} ''; - buildInputs = [ pkgs.utillinux ]; + buildInputs = [ pkgs.util-linux ]; QEMU_OPTS = "-nographic -serial stdio -monitor none" + lib.optionalString cfg.useEFIBoot ( " -drive if=pflash,format=raw,unit=0,readonly=on,file=${efiFirmware}" diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix index 7b2a66c4348..5ad647769bb 100644 --- a/nixos/modules/virtualisation/xen-dom0.nix +++ b/nixos/modules/virtualisation/xen-dom0.nix @@ -201,8 +201,8 @@ in '' if [ -d /proc/xen ]; then ${pkgs.kmod}/bin/modprobe xenfs 2> /dev/null - ${pkgs.utillinux}/bin/mountpoint -q /proc/xen || \ - ${pkgs.utillinux}/bin/mount -t xenfs none /proc/xen + ${pkgs.util-linux}/bin/mountpoint -q /proc/xen || \ + ${pkgs.util-linux}/bin/mount -t xenfs none /proc/xen fi ''; diff --git a/nixos/tests/os-prober.nix b/nixos/tests/os-prober.nix index be0235a4175..f778d30bdc0 100644 --- a/nixos/tests/os-prober.nix +++ b/nixos/tests/os-prober.nix @@ -9,7 +9,7 @@ let ${parted}/sbin/parted --script /dev/vda -- mkpart primary ext2 1M -1s mkdir /mnt ${e2fsprogs}/bin/mkfs.ext4 /dev/vda1 - ${utillinux}/bin/mount -t ext4 /dev/vda1 /mnt + ${util-linux}/bin/mount -t ext4 /dev/vda1 /mnt if test -e /mnt/.debug; then exec ${bash}/bin/sh diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix index dfa16eecfad..0fc788f860f 100644 --- a/nixos/tests/systemd.nix +++ b/nixos/tests/systemd.nix @@ -26,7 +26,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { systemd.shutdown.test = pkgs.writeScript "test.shutdown" '' #!${pkgs.runtimeShell} - PATH=${lib.makeBinPath (with pkgs; [ utillinux coreutils ])} + PATH=${lib.makeBinPath (with pkgs; [ util-linux coreutils ])} mount -t 9p shared -o trans=virtio,version=9p2000.L /tmp/shared touch /tmp/shared/shutdown-test umount /tmp/shared diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix index 0d9eafa4a20..900ee610a70 100644 --- a/nixos/tests/virtualbox.nix +++ b/nixos/tests/virtualbox.nix @@ -24,7 +24,7 @@ let miniInit = '' #!${pkgs.runtimeShell} -xe - export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.utillinux ]}" + export PATH="${lib.makeBinPath [ pkgs.coreutils pkgs.util-linux ]}" mkdir -p /run/dbus cat > /etc/passwd < $out/bin/shell < $out/bin/shell < $out/bin/transcrypt-depspathprefix << EOF #!${stdenv.shell} diff --git a/pkgs/applications/video/vcs/default.nix b/pkgs/applications/video/vcs/default.nix index 0cbdeaaf6ff..0280cfb3f1f 100644 --- a/pkgs/applications/video/vcs/default.nix +++ b/pkgs/applications/video/vcs/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, makeWrapper -, coreutils, ffmpeg, gawk, gnugrep, gnused, imagemagick, mplayer, utillinux +, coreutils, ffmpeg, gawk, gnugrep, gnused, imagemagick, mplayer, util-linux , dejavu_fonts }: with stdenv.lib; let version = "1.13.4"; - runtimeDeps = [ coreutils ffmpeg gawk gnugrep gnused imagemagick mplayer utillinux ]; + runtimeDeps = [ coreutils ffmpeg gawk gnugrep gnused imagemagick mplayer util-linux ]; in stdenv.mkDerivation { pname = "vcs"; diff --git a/pkgs/applications/video/vdr/plugins.nix b/pkgs/applications/video/vdr/plugins.nix index 30cd93178c2..e72de8e61f2 100644 --- a/pkgs/applications/video/vdr/plugins.nix +++ b/pkgs/applications/video/vdr/plugins.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, fetchgit, vdr, alsaLib, fetchFromGitHub , libvdpau, libxcb, xcbutilwm, graphicsmagick, libav, pcre, xorgserver, ffmpeg_3 -, libiconv, boost, libgcrypt, perl, utillinux, groff, libva, xorg, ncurses +, libiconv, boost, libgcrypt, perl, util-linux, groff, libva, xorg, ncurses , callPackage }: let mkPlugin = name: stdenv.mkDerivation { @@ -146,7 +146,7 @@ in { nativeBuildInputs = [ perl # for pod2man and pos2html - utillinux + util-linux groff ]; diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 94d0ae94dbd..6301182771f 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, edk2, utillinux, nasm, iasl +{ stdenv, lib, edk2, util-linux, nasm, iasl , csmSupport ? false, seabios ? null , secureBoot ? false }: @@ -24,7 +24,7 @@ edk2.mkDerivation projectDscPath { outputs = [ "out" "fd" ]; - buildInputs = [ utillinux nasm iasl ]; + buildInputs = [ util-linux nasm iasl ]; hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; diff --git a/pkgs/applications/virtualization/containerd/default.nix b/pkgs/applications/virtualization/containerd/default.nix index f3bcefcf173..c01586ce5c8 100644 --- a/pkgs/applications/virtualization/containerd/default.nix +++ b/pkgs/applications/virtualization/containerd/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, installShellFiles, utillinux, nixosTests }: +{ lib, fetchFromGitHub, buildGoPackage, btrfs-progs, go-md2man, installShellFiles, util-linux, nixosTests }: with lib; @@ -18,7 +18,7 @@ buildGoPackage rec { goPackagePath = "github.com/containerd/containerd"; outputs = [ "out" "man" ]; - nativeBuildInputs = [ go-md2man installShellFiles utillinux ]; + nativeBuildInputs = [ go-md2man installShellFiles util-linux ]; buildInputs = [ btrfs-progs ]; diff --git a/pkgs/applications/virtualization/cri-o/wrapper.nix b/pkgs/applications/virtualization/cri-o/wrapper.nix index 6d72623d86c..5aca291a601 100644 --- a/pkgs/applications/virtualization/cri-o/wrapper.nix +++ b/pkgs/applications/virtualization/cri-o/wrapper.nix @@ -7,7 +7,7 @@ , runc # Default container runtime , crun # Container runtime (default with cgroups v2 for podman/buildah) , conmon # Container runtime monitor -, utillinux # nsenter +, util-linux # nsenter , cni-plugins # not added to path , iptables }: @@ -19,7 +19,7 @@ let runc crun conmon - utillinux + util-linux iptables ] ++ extraPackages); diff --git a/pkgs/applications/virtualization/docker/default.nix b/pkgs/applications/virtualization/docker/default.nix index d3200bba928..5df0ae39a25 100644 --- a/pkgs/applications/virtualization/docker/default.nix +++ b/pkgs/applications/virtualization/docker/default.nix @@ -2,7 +2,7 @@ , makeWrapper, installShellFiles, pkgconfig , go-md2man, go, containerd, runc, docker-proxy, tini, libtool , sqlite, iproute, lvm2, systemd -, btrfs-progs, iptables, e2fsprogs, xz, utillinux, xfsprogs, git +, btrfs-progs, iptables, e2fsprogs, xz, util-linux, xfsprogs, git , procps, libseccomp , nixosTests }: @@ -140,7 +140,7 @@ rec { outputs = ["out" "man"]; - extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps utillinux git ]); + extraPath = optionals (stdenv.isLinux) (makeBinPath [ iproute iptables e2fsprogs xz xfsprogs procps util-linux git ]); installPhase = '' cd ./go/src/${goPackagePath} diff --git a/pkgs/applications/virtualization/podman/wrapper.nix b/pkgs/applications/virtualization/podman/wrapper.nix index d97d182496a..863888227b3 100644 --- a/pkgs/applications/virtualization/podman/wrapper.nix +++ b/pkgs/applications/virtualization/podman/wrapper.nix @@ -9,7 +9,7 @@ , conmon # Container runtime monitor , slirp4netns # User-mode networking for unprivileged namespaces , fuse-overlayfs # CoW for images, much faster than default vfs -, utillinux # nsenter +, util-linux # nsenter , cni-plugins # not added to path , iptables }: @@ -23,7 +23,7 @@ let conmon slirp4netns fuse-overlayfs - utillinux + util-linux iptables ] ++ extraPackages); diff --git a/pkgs/applications/virtualization/singularity/default.nix b/pkgs/applications/virtualization/singularity/default.nix index 8d04b871e49..21c978e1b0e 100644 --- a/pkgs/applications/virtualization/singularity/default.nix +++ b/pkgs/applications/virtualization/singularity/default.nix @@ -1,7 +1,7 @@ {stdenv , lib , fetchurl -, utillinux +, util-linux , gpgme , openssl , libuuid @@ -27,7 +27,7 @@ buildGoPackage rec { goPackagePath = "github.com/sylabs/singularity"; buildInputs = [ gpgme openssl libuuid ]; - nativeBuildInputs = [ utillinux which makeWrapper cryptsetup ]; + nativeBuildInputs = [ util-linux which makeWrapper cryptsetup ]; propagatedBuildInputs = [ coreutils squashfsTools ]; postPatch = '' diff --git a/pkgs/applications/virtualization/virt-manager/qt.nix b/pkgs/applications/virtualization/virt-manager/qt.nix index 45d1146f430..1d2a32c54e3 100644 --- a/pkgs/applications/virtualization/virt-manager/qt.nix +++ b/pkgs/applications/virtualization/virt-manager/qt.nix @@ -1,7 +1,7 @@ { mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, pkgconfig , qtbase, qtmultimedia, qtsvg, qttools, krdc , libvncserver, libvirt, pcre, pixman, qtermwidget, spice-gtk, spice-protocol -, libselinux, libsepol, utillinux +, libselinux, libsepol, util-linux }: mkDerivation rec { @@ -32,7 +32,7 @@ mkDerivation rec { buildInputs = [ qtbase qtmultimedia qtsvg krdc libvirt libvncserver pcre pixman qtermwidget spice-gtk spice-protocol - libselinux libsepol utillinux + libselinux libsepol util-linux ]; nativeBuildInputs = [ cmake pkgconfig qttools ]; diff --git a/pkgs/applications/virtualization/xen/generic.nix b/pkgs/applications/virtualization/xen/generic.nix index 854debc458a..53f556e3f0d 100644 --- a/pkgs/applications/virtualization/xen/generic.nix +++ b/pkgs/applications/virtualization/xen/generic.nix @@ -14,7 +14,7 @@ config: # Scripts , coreutils, gawk, gnused, gnugrep, diffutils, multipath-tools , iproute, inetutils, iptables, bridge-utils, openvswitch, nbd, drbd -, lvm2, utillinux, procps, systemd +, lvm2, util-linux, procps, systemd # Documentation # python2Packages.markdown @@ -28,7 +28,7 @@ let #TODO: fix paths instead scriptEnvPath = concatMapStringsSep ":" (x: "${x}/bin") [ which perl - coreutils gawk gnused gnugrep diffutils utillinux multipath-tools + coreutils gawk gnused gnugrep diffutils util-linux multipath-tools iproute inetutils iptables bridge-utils openvswitch nbd drbd ]; @@ -146,8 +146,8 @@ stdenv.mkDerivation (rec { --replace /usr/sbin/lvs ${lvm2}/bin/lvs substituteInPlace tools/misc/xenpvnetboot \ - --replace /usr/sbin/mount ${utillinux}/bin/mount \ - --replace /usr/sbin/umount ${utillinux}/bin/umount + --replace /usr/sbin/mount ${util-linux}/bin/mount \ + --replace /usr/sbin/umount ${util-linux}/bin/umount substituteInPlace tools/xenmon/xenmon.py \ --replace /usr/bin/pkill ${procps}/bin/pkill diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 4da26ba7cfd..db1062e1b5d 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -24,7 +24,7 @@ storeDir ? builtins.storeDir, substituteAll, symlinkJoin, - utillinux, + util-linux, vmTools, writeReferencesToFile, writeScript, @@ -204,7 +204,7 @@ rec { }; inherit fromImage fromImageName fromImageTag; - nativeBuildInputs = [ utillinux e2fsprogs jshon rsync jq ]; + nativeBuildInputs = [ util-linux e2fsprogs jshon rsync jq ]; } '' mkdir disk mkfs /dev/${vmTools.hd} diff --git a/pkgs/build-support/singularity-tools/default.nix b/pkgs/build-support/singularity-tools/default.nix index d937ec62668..4a54498d117 100644 --- a/pkgs/build-support/singularity-tools/default.nix +++ b/pkgs/build-support/singularity-tools/default.nix @@ -7,7 +7,7 @@ , bash , vmTools , gawk -, utillinux +, util-linux , runtimeShell , e2fsprogs }: @@ -47,7 +47,7 @@ rec { runScriptFile = shellScript "run-script.sh" runScript; result = vmTools.runInLinuxVM ( runCommand "singularity-image-${name}.img" { - buildInputs = [ singularity e2fsprogs utillinux gawk ]; + buildInputs = [ singularity e2fsprogs util-linux gawk ]; layerClosure = writeReferencesToFile layer; preVM = vmTools.createEmptyImage { size = diskSize; diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 909cdc6da04..2f18e96e4ce 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -151,7 +151,7 @@ rec { # Set the system time from the hardware clock. Works around an # apparent KVM > 1.5.2 bug. - ${pkgs.utillinux}/bin/hwclock -s + ${pkgs.util-linux}/bin/hwclock -s export NIX_STORE=${storeDir} export NIX_BUILD_TOP=/tmp @@ -270,7 +270,7 @@ rec { defaultCreateRootFS = '' mkdir /mnt ${e2fsprogs}/bin/mkfs.ext4 /dev/${hd} - ${utillinux}/bin/mount -t ext4 /dev/${hd} /mnt + ${util-linux}/bin/mount -t ext4 /dev/${hd} /mnt if test -e /mnt/.debug; then exec ${bash}/bin/sh @@ -317,7 +317,7 @@ rec { with pkgs; runInLinuxVM ( stdenv.mkDerivation { name = "extract-file"; - buildInputs = [ utillinux ]; + buildInputs = [ util-linux ]; buildCommand = '' ln -s ${kernel}/lib /lib ${kmod}/bin/modprobe loop @@ -342,7 +342,7 @@ rec { with pkgs; runInLinuxVM ( stdenv.mkDerivation { name = "extract-file-mtd"; - buildInputs = [ utillinux mtdutils ]; + buildInputs = [ util-linux mtdutils ]; buildCommand = '' ln -s ${kernel}/lib /lib ${kmod}/bin/modprobe mtd @@ -417,7 +417,7 @@ rec { # Make the Nix store available in /mnt, because that's where the RPMs live. mkdir -p /mnt${storeDir} - ${utillinux}/bin/mount -o bind ${storeDir} /mnt${storeDir} + ${util-linux}/bin/mount -o bind ${storeDir} /mnt${storeDir} # Newer distributions like Fedora 18 require /lib etc. to be # symlinked to /usr. @@ -427,7 +427,7 @@ rec { ln -s /usr/sbin /mnt/sbin ln -s /usr/lib /mnt/lib ln -s /usr/lib64 /mnt/lib64 - ${utillinux}/bin/mount -t proc none /mnt/proc + ${util-linux}/bin/mount -t proc none /mnt/proc ''} echo "unpacking RPMs..." @@ -445,7 +445,7 @@ rec { PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \ rpm --initdb - ${utillinux}/bin/mount -o bind /tmp /mnt/tmp + ${util-linux}/bin/mount -o bind /tmp /mnt/tmp echo "installing RPMs..." PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \ @@ -456,8 +456,8 @@ rec { rm /mnt/.debug - ${utillinux}/bin/umount /mnt${storeDir} /mnt/tmp ${lib.optionalString unifiedSystemDir "/mnt/proc"} - ${utillinux}/bin/umount /mnt + ${util-linux}/bin/umount /mnt${storeDir} /mnt/tmp ${lib.optionalString unifiedSystemDir "/mnt/proc"} + ${util-linux}/bin/umount /mnt ''; passthru = { inherit fullName; }; @@ -587,9 +587,9 @@ rec { # Make the Nix store available in /mnt, because that's where the .debs live. mkdir -p /mnt/inst${storeDir} - ${utillinux}/bin/mount -o bind ${storeDir} /mnt/inst${storeDir} - ${utillinux}/bin/mount -o bind /proc /mnt/proc - ${utillinux}/bin/mount -o bind /dev /mnt/dev + ${util-linux}/bin/mount -o bind ${storeDir} /mnt/inst${storeDir} + ${util-linux}/bin/mount -o bind /proc /mnt/proc + ${util-linux}/bin/mount -o bind /dev /mnt/dev # Misc. files/directories assumed by various packages. echo "initialising Dpkg DB..." @@ -635,10 +635,10 @@ rec { rm /mnt/.debug - ${utillinux}/bin/umount /mnt/inst${storeDir} - ${utillinux}/bin/umount /mnt/proc - ${utillinux}/bin/umount /mnt/dev - ${utillinux}/bin/umount /mnt + ${util-linux}/bin/umount /mnt/inst${storeDir} + ${util-linux}/bin/umount /mnt/proc + ${util-linux}/bin/umount /mnt/dev + ${util-linux}/bin/umount /mnt ''; passthru = { inherit fullName; }; diff --git a/pkgs/desktops/enlightenment/efl/default.nix b/pkgs/desktops/enlightenment/efl/default.nix index f8cb1a1c744..00ea83cb85c 100644 --- a/pkgs/desktops/enlightenment/efl/default.nix +++ b/pkgs/desktops/enlightenment/efl/default.nix @@ -46,7 +46,7 @@ , python3Packages , systemd , udev -, utillinux +, util-linux , wayland , wayland-protocols , writeText @@ -125,7 +125,7 @@ stdenv.mkDerivation rec { mint-x-icons # Mint-X is a parent icon theme of Enlightenment-X openjpeg poppler - utillinux + util-linux wayland xorg.libXScrnSaver xorg.libXcomposite diff --git a/pkgs/desktops/plasma-5/discover.nix b/pkgs/desktops/plasma-5/discover.nix index a859285e078..ccfeaa4f63e 100644 --- a/pkgs/desktops/plasma-5/discover.nix +++ b/pkgs/desktops/plasma-5/discover.nix @@ -1,7 +1,7 @@ { mkDerivation, extra-cmake-modules, gettext, kdoctools, python, - appstream-qt, discount, flatpak, fwupd, ostree, packagekit-qt, pcre, utillinux, + appstream-qt, discount, flatpak, fwupd, ostree, packagekit-qt, pcre, util-linux, qtquickcontrols2, karchive, kconfig, kcrash, kdbusaddons, kdeclarative, kio, kirigami2, kitemmodels, knewstuff, kwindowsystem, kxmlgui, plasma-framework @@ -12,7 +12,7 @@ mkDerivation { nativeBuildInputs = [ extra-cmake-modules gettext kdoctools python ]; buildInputs = [ # discount is needed for libmarkdown - appstream-qt discount flatpak fwupd ostree packagekit-qt pcre utillinux + appstream-qt discount flatpak fwupd ostree packagekit-qt pcre util-linux qtquickcontrols2 karchive kconfig kcrash kdbusaddons kdeclarative kio kirigami2 kitemmodels knewstuff kwindowsystem kxmlgui plasma-framework diff --git a/pkgs/desktops/plasma-5/plasma-desktop/default.nix b/pkgs/desktops/plasma-5/plasma-desktop/default.nix index 8ae48b21f7b..73e449a1362 100644 --- a/pkgs/desktops/plasma-5/plasma-desktop/default.nix +++ b/pkgs/desktops/plasma-5/plasma-desktop/default.nix @@ -4,7 +4,7 @@ boost, fontconfig, ibus, libXcursor, libXft, libcanberra_kde, libpulseaudio, libxkbfile, xf86inputevdev, xf86inputsynaptics, xinput, xkeyboard_config, - xorgserver, utillinux, + xorgserver, util-linux, qtdeclarative, qtquickcontrols, qtquickcontrols2, qtsvg, qtx11extras, @@ -39,7 +39,7 @@ mkDerivation { ''; CXXFLAGS = [ "-I${lib.getDev xorgserver}/include/xorg" - ''-DNIXPKGS_HWCLOCK=\"${lib.getBin utillinux}/sbin/hwclock\"'' + ''-DNIXPKGS_HWCLOCK=\"${lib.getBin util-linux}/sbin/hwclock\"'' ]; cmakeFlags = [ "-DEvdev_INCLUDE_DIRS=${lib.getDev xf86inputevdev}/include/xorg" diff --git a/pkgs/development/compilers/elm/packages/node-composition.nix b/pkgs/development/compilers/elm/packages/node-composition.nix index 9c6bdb2006a..1b2e11782cd 100644 --- a/pkgs/development/compilers/elm/packages/node-composition.nix +++ b/pkgs/development/compilers/elm/packages/node-composition.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../../node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/development/compilers/osl/default.nix b/pkgs/development/compilers/osl/default.nix index e9ca1bf35b8..2c00420c362 100644 --- a/pkgs/development/compilers/osl/default.nix +++ b/pkgs/development/compilers/osl/default.nix @@ -1,6 +1,6 @@ { clangStdenv, stdenv, fetchFromGitHub, cmake, zlib, openexr, openimageio, llvm, boost165, flex, bison, partio, pugixml, -utillinux, python +util-linux, python }: let boost_static = boost165.override { enableStatic = true; }; @@ -25,7 +25,7 @@ in clangStdenv.mkDerivation rec { buildInputs = [ cmake zlib openexr openimageio llvm boost_static flex bison partio pugixml - utillinux # needed just for hexdump + util-linux # needed just for hexdump python # CMake doesn't check this? ]; # TODO: How important is partio? CMake doesn't seem to find it diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 694ba6935b0..a1fcd89803a 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -112584,7 +112584,7 @@ self: { , pandoc-citeproc, parsec, process, QuickCheck, random, regex-tdfa , resourcet, scientific, tagsoup, tasty, tasty-hunit , tasty-quickcheck, template-haskell, text, time - , time-locale-compat, unordered-containers, utillinux, vector, wai + , time-locale-compat, unordered-containers, util-linux, vector, wai , wai-app-static, warp, yaml }: mkDerivation { @@ -112608,12 +112608,12 @@ self: { base bytestring containers filepath QuickCheck tasty tasty-hunit tasty-quickcheck text unordered-containers yaml ]; - testToolDepends = [ utillinux ]; + testToolDepends = [ util-linux ]; description = "A static website compiler library"; license = stdenv.lib.licenses.bsd3; hydraPlatforms = stdenv.lib.platforms.none; broken = true; - }) {inherit (pkgs) utillinux;}; + }) {inherit (pkgs) util-linux;}; "hakyll-R" = callPackage ({ mkDerivation, base, directory, filepath, hakyll, pandoc, process diff --git a/pkgs/development/libraries/bobcat/default.nix b/pkgs/development/libraries/bobcat/default.nix index a95f131c00c..5473801f85d 100644 --- a/pkgs/development/libraries/bobcat/default.nix +++ b/pkgs/development/libraries/bobcat/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitLab, icmake , libmilter, libX11, openssl, readline -, utillinux, yodl }: +, util-linux, yodl }: stdenv.mkDerivation rec { pname = "bobcat"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { owner = "fbb-git"; }; - buildInputs = [ libmilter libX11 openssl readline utillinux ]; + buildInputs = [ libmilter libX11 openssl readline util-linux ]; nativeBuildInputs = [ icmake yodl ]; setSourceRoot = '' diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index de874a798b2..072a12410f4 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -1,7 +1,7 @@ { config, stdenv, fetchurl, gettext, meson, ninja, pkgconfig, perl, python3 , libiconv, zlib, libffi, pcre, libelf, gnome3, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45 -# use utillinuxMinimal to avoid circular dependency (utillinux, systemd, glib) -, utillinuxMinimal ? null +# use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib) +, util-linuxMinimal ? null , buildPackages # this is just for tests (not in the closure of any regular package) @@ -13,7 +13,7 @@ with stdenv.lib; -assert stdenv.isLinux -> utillinuxMinimal != null; +assert stdenv.isLinux -> util-linuxMinimal != null; # TODO: # * Make it build without python @@ -94,7 +94,7 @@ stdenv.mkDerivation rec { bash gnum4 # install glib-gettextize and m4 macros for other apps to use ] ++ optionals stdenv.isLinux [ libselinux - utillinuxMinimal # for libmount + util-linuxMinimal # for libmount ] ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Carbon Cocoa CoreFoundation CoreServices Foundation ]); diff --git a/pkgs/development/libraries/gnutls/default.nix b/pkgs/development/libraries/gnutls/default.nix index 2436fc4afcb..d3d50fd6d65 100644 --- a/pkgs/development/libraries/gnutls/default.nix +++ b/pkgs/development/libraries/gnutls/default.nix @@ -1,6 +1,6 @@ { config, lib, stdenv, fetchurl, zlib, lzo, libtasn1, nettle, pkgconfig, lzip , perl, gmp, autoconf, autogen, automake, libidn, p11-kit, libiconv -, unbound, dns-root-data, gettext, cacert, utillinux +, unbound, dns-root-data, gettext, cacert, util-linux , guileBindings ? config.gnutls.guile or false, guile , tpmSupport ? false, trousers, which, nettools, libunistring , withSecurity ? false, Security # darwin Security.framework @@ -75,7 +75,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ perl pkgconfig ] ++ lib.optionals (isDarwin && !withSecurity) [ autoconf automake ] - ++ lib.optionals doCheck [ which nettools utillinux ]; + ++ lib.optionals doCheck [ which nettools util-linux ]; propagatedBuildInputs = [ nettle ]; diff --git a/pkgs/development/libraries/hyperscan/default.nix b/pkgs/development/libraries/hyperscan/default.nix index 6e0d351b8bc..17246f0aa0a 100644 --- a/pkgs/development/libraries/hyperscan/default.nix +++ b/pkgs/development/libraries/hyperscan/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, cmake, ragel, python3 -, coreutils, gnused, utillinux +, coreutils, gnused, util-linux , boost , withStatic ? false # build only shared libs by default, build static+shared if true }: @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { cmake ragel python3 # Consider simply using busybox for these # Need at least: rev, sed, cut, nm - coreutils gnused utillinux + coreutils gnused util-linux ]; cmakeFlags = [ diff --git a/pkgs/development/libraries/kpmcore/default.nix b/pkgs/development/libraries/kpmcore/default.nix index 8cda52c4aec..1c00b6be2f2 100644 --- a/pkgs/development/libraries/kpmcore/default.nix +++ b/pkgs/development/libraries/kpmcore/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, extra-cmake-modules , qtbase, kio , libatasmart, parted -, utillinux }: +, util-linux }: stdenv.mkDerivation rec { pname = "kpmcore"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { kio - utillinux # needs blkid (note that this is not provided by utillinux-compat) + util-linux # needs blkid (note that this is not provided by util-linux-compat) ]; nativeBuildInputs = [ extra-cmake-modules ]; diff --git a/pkgs/development/libraries/libblockdev/default.nix b/pkgs/development/libraries/libblockdev/default.nix index 7628212800f..39646db87ec 100644 --- a/pkgs/development/libraries/libblockdev/default.nix +++ b/pkgs/development/libraries/libblockdev/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, gtk-doc , docbook_xml_dtd_43, python3, gobject-introspection, glib, udev, kmod, parted -, cryptsetup, lvm2, dmraid, utillinux, libbytesize, libndctl, nss, volume_key +, cryptsetup, lvm2, dmraid, util-linux, libbytesize, libndctl, nss, volume_key , libxslt, docbook_xsl, gptfdisk, libyaml, autoconf-archive , thin-provisioning-tools, makeWrapper }: @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - glib udev kmod parted gptfdisk cryptsetup lvm2 dmraid utillinux libbytesize + glib udev kmod parted gptfdisk cryptsetup lvm2 dmraid util-linux libbytesize libndctl nss volume_key libyaml ]; diff --git a/pkgs/development/libraries/libndctl/default.nix b/pkgs/development/libraries/libndctl/default.nix index c0800c991c4..6ca6c301831 100644 --- a/pkgs/development/libraries/libndctl/default.nix +++ b/pkgs/development/libraries/libndctl/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, autoreconfHook , asciidoctor, pkgconfig, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt -, json_c, kmod, which, utillinux, udev, keyutils +, json_c, kmod, which, util-linux, udev, keyutils }: stdenv.mkDerivation rec { @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { ]; buildInputs = - [ json_c kmod utillinux udev keyutils + [ json_c kmod util-linux udev keyutils ]; configureFlags = diff --git a/pkgs/development/libraries/libseccomp/default.nix b/pkgs/development/libraries/libseccomp/default.nix index 6ea0e6be465..d3d73e46ac2 100644 --- a/pkgs/development/libraries/libseccomp/default.nix +++ b/pkgs/development/libraries/libseccomp/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, getopt, utillinux, gperf }: +{ stdenv, fetchurl, getopt, util-linux, gperf }: stdenv.mkDerivation rec { pname = "libseccomp"; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { patchShebangs . ''; - checkInputs = [ utillinux ]; + checkInputs = [ util-linux ]; doCheck = false; # dependency cycle # Hack to ensure that patchelf --shrink-rpath get rids of a $TMPDIR reference. diff --git a/pkgs/development/libraries/libvirt/5.9.0.nix b/pkgs/development/libraries/libvirt/5.9.0.nix index 7a023d9489e..b880d364274 100644 --- a/pkgs/development/libraries/libvirt/5.9.0.nix +++ b/pkgs/development/libraries/libvirt/5.9.0.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, fetchgit , pkgconfig, makeWrapper, libtool, autoconf, automake, fetchpatch , coreutils, libxml2, gnutls, perl, python2, attr -, iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext +, iproute, iptables, readline, lvm2, util-linux, systemd, libpciaccess, gettext , libtasn1, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages , curl, libiconv, gmp, zfs, parted, bridge-utils, dmidecode, glib, rpcsvc-proto, libtirpc @@ -40,7 +40,7 @@ in stdenv.mkDerivation rec { ] ++ optionals (!buildFromTarball) [ libtool autoconf automake ] ++ optionals stdenv.isLinux [ - libpciaccess lvm2 utillinux systemd libnl numad zfs + libpciaccess lvm2 util-linux systemd libnl numad zfs libapparmor libcap_ng numactl attr parted libtirpc ] ++ optionals (enableXen && stdenv.isLinux && stdenv.isx86_64) [ xen diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index 642baba4376..224168888c0 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, fetchgit , pkgconfig, makeWrapper, autoreconfHook, fetchpatch , coreutils, libxml2, gnutls, perl, python2, attr, glib, docutils -, iproute, iptables, readline, lvm2, utillinux, systemd, libpciaccess, gettext +, iproute, iptables, readline, lvm2, util-linux, systemd, libpciaccess, gettext , libtasn1, ebtables, libgcrypt, yajl, pmutils, libcap_ng, libapparmor , dnsmasq, libnl, libpcap, libxslt, xhtml1, numad, numactl, perlPackages , curl, libiconv, gmp, zfs, parted, bridge-utils, dmidecode, dbus, libtirpc, rpcsvc-proto, darwin @@ -47,7 +47,7 @@ in stdenv.mkDerivation rec { libxml2 gnutls perl python2 readline gettext libtasn1 libgcrypt yajl libxslt xhtml1 perlPackages.XMLXPath curl libpcap glib dbus ] ++ optionals stdenv.isLinux [ - libpciaccess lvm2 utillinux systemd libnl numad zfs + libpciaccess lvm2 util-linux systemd libnl numad zfs libapparmor libcap_ng numactl attr parted libtirpc ] ++ optionals (enableXen && stdenv.isLinux && stdenv.isx86_64) [ xen diff --git a/pkgs/development/libraries/libxsmm/default.nix b/pkgs/development/libraries/libxsmm/default.nix index 394347277f6..30f060405f0 100644 --- a/pkgs/development/libraries/libxsmm/default.nix +++ b/pkgs/development/libraries/libxsmm/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, coreutils, gfortran, gnused -, python3, utillinux, which +, python3, util-linux, which , enableStatic ? false }: @@ -22,7 +22,7 @@ in stdenv.mkDerivation { gfortran gnused python3 - utillinux + util-linux which ]; diff --git a/pkgs/development/libraries/speechd/default.nix b/pkgs/development/libraries/speechd/default.nix index fbf399cb246..483b8eeb206 100644 --- a/pkgs/development/libraries/speechd/default.nix +++ b/pkgs/development/libraries/speechd/default.nix @@ -7,7 +7,7 @@ , itstool , libtool , texinfo -, utillinux +, util-linux , autoreconfHook , glib , dotconf @@ -49,7 +49,7 @@ in stdenv.mkDerivation rec { patches = [ (substituteAll { src = ./fix-paths.patch; - inherit utillinux; + utillinux = util-linux; }) ]; diff --git a/pkgs/development/libraries/volume-key/default.nix b/pkgs/development/libraries/volume-key/default.nix index 7ac5a437010..084b42c9a2d 100644 --- a/pkgs/development/libraries/volume-key/default.nix +++ b/pkgs/development/libraries/volume-key/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchgit, autoreconfHook, pkgconfig, gettext, python3 -, ncurses, swig, glib, utillinux, cryptsetup, nss, gpgme +, ncurses, swig, glib, util-linux, cryptsetup, nss, gpgme , autoconf, automake, libtool , buildPackages }: @@ -20,7 +20,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ autoconf automake libtool pkgconfig gettext swig ]; - buildInputs = [ autoreconfHook glib cryptsetup nss utillinux gpgme ncurses ]; + buildInputs = [ autoreconfHook glib cryptsetup nss util-linux gpgme ncurses ]; configureFlags = [ "--with-gpgme-prefix=${gpgme.dev}" diff --git a/pkgs/development/misc/google-clasp/google-clasp.nix b/pkgs/development/misc/google-clasp/google-clasp.nix index a527491777b..be260edb643 100644 --- a/pkgs/development/misc/google-clasp/google-clasp.nix +++ b/pkgs/development/misc/google-clasp/google-clasp.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/development/mobile/abootimg/default.nix b/pkgs/development/mobile/abootimg/default.nix index fb74d79e7a7..21d24004645 100644 --- a/pkgs/development/mobile/abootimg/default.nix +++ b/pkgs/development/mobile/abootimg/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, coreutils, cpio, findutils, gzip, makeWrapper, utillinux }: +{ stdenv, fetchFromGitHub, coreutils, cpio, findutils, gzip, makeWrapper, util-linux }: let version = "0.6"; @@ -14,7 +14,7 @@ stdenv.mkDerivation { sha256 = "1qgx9fxwhylgnixzkz2mzv2707f65qq7rar2rsqak536vhig1z9a"; }; - nativeBuildInputs = [ makeWrapper utillinux ]; + nativeBuildInputs = [ makeWrapper util-linux ]; postPatch = '' cat < version.h diff --git a/pkgs/development/node-packages/composition.nix b/pkgs/development/node-packages/composition.nix index c970861a86f..17879f381d5 100644 --- a/pkgs/development/node-packages/composition.nix +++ b/pkgs/development/node-packages/composition.nix @@ -6,7 +6,7 @@ let nodeEnv = import ./node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/development/node-packages/node-env.nix b/pkgs/development/node-packages/node-env.nix index e1abf530493..04e3ee097fa 100644 --- a/pkgs/development/node-packages/node-env.nix +++ b/pkgs/development/node-packages/node-env.nix @@ -1,6 +1,6 @@ # This file originates from node2nix -{stdenv, nodejs, python2, utillinux, libtool, runCommand, writeTextFile}: +{stdenv, nodejs, python2, util-linux, libtool, runCommand, writeTextFile}: let python = if nodejs ? python then nodejs.python else python2; @@ -396,7 +396,7 @@ let stdenv.mkDerivation ({ name = "node_${name}-${version}"; buildInputs = [ tarWrapper python nodejs ] - ++ stdenv.lib.optional (stdenv.isLinux) utillinux + ++ stdenv.lib.optional (stdenv.isLinux) util-linux ++ stdenv.lib.optional (stdenv.isDarwin) libtool ++ buildInputs; @@ -470,7 +470,7 @@ let name = "node-dependencies-${name}-${version}"; buildInputs = [ tarWrapper python nodejs ] - ++ stdenv.lib.optional (stdenv.isLinux) utillinux + ++ stdenv.lib.optional (stdenv.isLinux) util-linux ++ stdenv.lib.optional (stdenv.isDarwin) libtool ++ buildInputs; @@ -516,7 +516,7 @@ let stdenv.mkDerivation { name = "node-shell-${name}-${version}"; - buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs; + buildInputs = [ python nodejs ] ++ stdenv.lib.optional (stdenv.isLinux) util-linux ++ buildInputs; buildCommand = '' mkdir -p $out/bin cat > $out/bin/shell < $out/bin/shell < $out/usr/bin/brprintconf_mfcj6510dw_patched diff --git a/pkgs/misc/drivers/hplip/3.16.11.nix b/pkgs/misc/drivers/hplip/3.16.11.nix index 452c2c425c1..4b9f47d88f9 100644 --- a/pkgs/misc/drivers/hplip/3.16.11.nix +++ b/pkgs/misc/drivers/hplip/3.16.11.nix @@ -2,7 +2,7 @@ , pkgconfig , cups, libjpeg, libusb1, python2Packages, sane-backends, dbus, usbutils , net-snmp, openssl, nettools -, bash, coreutils, utillinux +, bash, coreutils, util-linux , qtSupport ? true , withPlugin ? false }: @@ -175,7 +175,7 @@ python2Packages.buildPythonApplication { substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ --replace {,${bash}}/bin/sh \ --replace /usr/bin/nohup "" \ - --replace {,${utillinux}/bin/}logger \ + --replace {,${util-linux}/bin/}logger \ --replace {/usr,$out}/bin ''; diff --git a/pkgs/misc/drivers/hplip/3.18.5.nix b/pkgs/misc/drivers/hplip/3.18.5.nix index f9064720fb6..59b3d2b9d63 100644 --- a/pkgs/misc/drivers/hplip/3.18.5.nix +++ b/pkgs/misc/drivers/hplip/3.18.5.nix @@ -3,7 +3,7 @@ , cups, zlib, libjpeg, libusb1, python2Packages, sane-backends , dbus, file, ghostscript, usbutils , net-snmp, openssl, perl, nettools -, bash, coreutils, utillinux +, bash, coreutils, util-linux , withQt5 ? true , withPlugin ? false , withStaticPPDInstall ? false @@ -212,7 +212,7 @@ python2Packages.buildPythonApplication { substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ --replace {,${bash}}/bin/sh \ --replace /usr/bin/nohup "" \ - --replace {,${utillinux}/bin/}logger \ + --replace {,${util-linux}/bin/}logger \ --replace {/usr,$out}/bin ''; diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index afd1f8f6fe4..b740f5091fa 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -3,7 +3,7 @@ , cups, zlib, libjpeg, libusb1, python3Packages, sane-backends , dbus, file, ghostscript, usbutils , net-snmp, openssl, perl, nettools -, bash, coreutils, utillinux +, bash, coreutils, util-linux # To remove references to gcc-unwrapped , removeReferencesTo, qt5 , withQt5 ? true @@ -219,7 +219,7 @@ python3Packages.buildPythonApplication { substituteInPlace $out/etc/udev/rules.d/56-hpmud.rules \ --replace {,${bash}}/bin/sh \ --replace /usr/bin/nohup "" \ - --replace {,${utillinux}/bin/}logger \ + --replace {,${util-linux}/bin/}logger \ --replace {/usr,$out}/bin remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/lib/*.so) '' + stdenv.lib.optionalString withQt5 '' diff --git a/pkgs/misc/emulators/cdemu/libmirage.nix b/pkgs/misc/emulators/cdemu/libmirage.nix index cc3118ace15..e824e19347a 100644 --- a/pkgs/misc/emulators/cdemu/libmirage.nix +++ b/pkgs/misc/emulators/cdemu/libmirage.nix @@ -1,6 +1,6 @@ { callPackage, gobject-introspection, cmake, pkgconfig , glib, libsndfile, zlib, bzip2, lzma, libsamplerate, intltool -, pcre, utillinux, libselinux, libsepol }: +, pcre, util-linux, libselinux, libsepol }: let pkg = import ./base.nix { version = "3.2.3"; @@ -13,6 +13,6 @@ in callPackage pkg { PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "out"}/share/gir-1.0"; PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; nativeBuildInputs = [ cmake gobject-introspection pkgconfig ]; - propagatedBuildInputs = [ pcre utillinux libselinux libsepol ]; + propagatedBuildInputs = [ pcre util-linux libselinux libsepol ]; }; } diff --git a/pkgs/misc/emulators/qmc2/default.nix b/pkgs/misc/emulators/qmc2/default.nix index d089ddf2695..5a813c5d2ef 100644 --- a/pkgs/misc/emulators/qmc2/default.nix +++ b/pkgs/misc/emulators/qmc2/default.nix @@ -3,7 +3,7 @@ , minizip, zlib , qtbase, qtsvg, qtmultimedia, qtwebkit, qttranslations, qtxmlpatterns , rsync, SDL2, xwininfo -, utillinux +, util-linux , xorg }: @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ qttools pkgconfig ]; buildInputs = [ minizip qtbase qtsvg qtmultimedia qtwebkit qttranslations qtxmlpatterns rsync SDL2 - xwininfo zlib utillinux xorg.libxcb ]; + xwininfo zlib util-linux xorg.libxcb ]; makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" diff --git a/pkgs/misc/emulators/wine/staging.nix b/pkgs/misc/emulators/wine/staging.nix index f3b9fa30420..a628f5ded58 100644 --- a/pkgs/misc/emulators/wine/staging.nix +++ b/pkgs/misc/emulators/wine/staging.nix @@ -8,7 +8,7 @@ let patch = (callPackage ./sources.nix {}).staging; in assert stdenv.lib.getVersion wineUnstable == patch.version; (stdenv.lib.overrideDerivation wineUnstable (self: { - buildInputs = build-inputs [ "perl" "utillinux" "autoconf" "gitMinimal" ] self.buildInputs; + buildInputs = build-inputs [ "perl" "util-linux" "autoconf" "gitMinimal" ] self.buildInputs; name = "${self.name}-staging"; diff --git a/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix index 446fedeffec..c49f798899f 100644 --- a/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix +++ b/pkgs/misc/vscode-extensions/ms-vsliveshare-vsliveshare/default.nix @@ -2,7 +2,7 @@ # - # - { lib, gccStdenv, vscode-utils, autoPatchelfHook, bash, file, makeWrapper, dotnet-sdk_3 -, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, utillinux, zlib +, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, util-linux, zlib , desktop-file-utils, xprop }: @@ -30,7 +30,7 @@ let # General gcc.cc.lib - utillinux # libuuid + util-linux # libuuid ]; in ((vscode-utils.override { stdenv = gccStdenv; }).buildVscodeMarketplaceExtension { diff --git a/pkgs/os-specific/linux/displaylink/default.nix b/pkgs/os-specific/linux/displaylink/default.nix index 3db9a7d3005..dcdafb98d70 100644 --- a/pkgs/os-specific/linux/displaylink/default.nix +++ b/pkgs/os-specific/linux/displaylink/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, unzip, utillinux, +{ stdenv, lib, unzip, util-linux, libusb1, evdi, systemd, makeWrapper, requireFile, substituteAll }: let @@ -7,7 +7,7 @@ let else if stdenv.hostPlatform.system == "i686-linux" then "x86" else throw "Unsupported architecture"; bins = "${arch}-ubuntu-1604"; - libPath = lib.makeLibraryPath [ stdenv.cc.cc utillinux libusb1 evdi ]; + libPath = lib.makeLibraryPath [ stdenv.cc.cc util-linux libusb1 evdi ]; in stdenv.mkDerivation rec { pname = "displaylink"; diff --git a/pkgs/os-specific/linux/eudev/default.nix b/pkgs/os-specific/linux/eudev/default.nix index d087a9e2e26..696dfd275c7 100644 --- a/pkgs/os-specific/linux/eudev/default.nix +++ b/pkgs/os-specific/linux/eudev/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, pkgconfig, glib, gperf, utillinux, kmod}: +{stdenv, fetchurl, pkgconfig, glib, gperf, util-linux, kmod}: let s = # Generated upstream information rec { @@ -11,7 +11,7 @@ let nativeBuildInputs = [ pkgconfig ]; buildInputs = [ - glib gperf utillinux kmod + glib gperf util-linux kmod ]; in stdenv.mkDerivation { diff --git a/pkgs/os-specific/linux/fuse/common.nix b/pkgs/os-specific/linux/fuse/common.nix index 19c64106701..b40bd84cbb8 100644 --- a/pkgs/os-specific/linux/fuse/common.nix +++ b/pkgs/os-specific/linux/fuse/common.nix @@ -1,7 +1,7 @@ { version, sha256Hash }: { stdenv, fetchFromGitHub, fetchpatch -, fusePackages, utillinux, gettext +, fusePackages, util-linux, gettext , meson, ninja, pkg-config , autoreconfHook , python3Packages, which @@ -54,7 +54,7 @@ in stdenv.mkDerivation rec { # $PATH, so it should also work on non-NixOS systems. export NIX_CFLAGS_COMPILE="-DFUSERMOUNT_DIR=\"/run/wrappers/bin\"" - sed -e 's@/bin/@${utillinux}/bin/@g' -i lib/mount_util.c + sed -e 's@/bin/@${util-linux}/bin/@g' -i lib/mount_util.c '' + (if isFuse3 then '' # The configure phase will delete these files (temporary workaround for # ./fuse3-install_man.patch) diff --git a/pkgs/os-specific/linux/fuse/default.nix b/pkgs/os-specific/linux/fuse/default.nix index 7549f379f8a..f159a4cbf77 100644 --- a/pkgs/os-specific/linux/fuse/default.nix +++ b/pkgs/os-specific/linux/fuse/default.nix @@ -1,8 +1,8 @@ -{ callPackage, utillinux }: +{ callPackage, util-linux }: let mkFuse = args: callPackage (import ./common.nix args) { - inherit utillinux; + inherit util-linux; }; in { fuse_2 = mkFuse { diff --git a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix index ba37c71d134..a272bd286f3 100644 --- a/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, utillinux, ... } @ args: +{ stdenv, buildPackages, fetchFromGitHub, perl, buildLinux, libelf, util-linux, ... } @ args: buildLinux (args // rec { version = "4.14.165-172"; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 961bdab12b5..3bdb8c4f297 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -302,7 +302,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" && stdenv.lib.versionOlder version "5.8") libelf - # Removed utillinuxMinimal since it should not be a dependency. + # Removed util-linuxMinimal since it should not be a dependency. ++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ] ++ optional (stdenv.lib.versionAtLeast version "5.2") cpio ++ optional (stdenv.lib.versionAtLeast version "5.8") elfutils diff --git a/pkgs/os-specific/linux/ldm/default.nix b/pkgs/os-specific/linux/ldm/default.nix index bbc341caf11..352ce535337 100644 --- a/pkgs/os-specific/linux/ldm/default.nix +++ b/pkgs/os-specific/linux/ldm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, udev, utillinux, mountPath ? "/media/" }: +{ stdenv, fetchgit, udev, util-linux, mountPath ? "/media/" }: assert mountPath != ""; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { sha256 = "0lxfypnbamfx6p9ar5k9wra20gvwn665l4pp2j4vsx4yi5q7rw2n"; }; - buildInputs = [ udev utillinux ]; + buildInputs = [ udev util-linux ]; postPatch = '' substituteInPlace ldm.c \ diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index 7bbd1768c04..6f1290cf070 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -2,7 +2,7 @@ , fetchpatch , fetchurl , pkgconfig -, utillinux +, util-linux , libuuid , thin-provisioning-tools, libaio , enableCmdlib ? false diff --git a/pkgs/os-specific/linux/lxcfs/default.nix b/pkgs/os-specific/linux/lxcfs/default.nix index 0067f0881ae..8fdb72e060f 100644 --- a/pkgs/os-specific/linux/lxcfs/default.nix +++ b/pkgs/os-specific/linux/lxcfs/default.nix @@ -1,5 +1,5 @@ { config, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, help2man, fuse -, utillinux, makeWrapper +, util-linux, makeWrapper , enableDebugBuild ? config.lxcfs.enableDebugBuild or false }: with stdenv.lib; @@ -30,9 +30,9 @@ stdenv.mkDerivation rec { installFlags = [ "SYSTEMD_UNIT_DIR=\${out}/lib/systemd" ]; postInstall = '' - # `mount` hook requires access to the `mount` command from `utillinux`: + # `mount` hook requires access to the `mount` command from `util-linux`: wrapProgram "$out/share/lxcfs/lxc.mount.hook" \ - --prefix PATH : "${utillinux}/bin" + --prefix PATH : "${util-linux}/bin" ''; postFixup = '' diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index 9ead1f6ad4b..f0ef1126154 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, utillinux }: +{ stdenv, fetchFromGitHub, util-linux }: stdenv.mkDerivation rec { pname = "mcelog"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { substituteInPlace Makefile --replace '"unknown"' '"${version}"' for i in triggers/*; do - substituteInPlace $i --replace 'logger' '${utillinux}/bin/logger' + substituteInPlace $i --replace 'logger' '${util-linux}/bin/logger' done ''; diff --git a/pkgs/os-specific/linux/mdadm/default.nix b/pkgs/os-specific/linux/mdadm/default.nix index 6a71196157b..2fbe05557a2 100644 --- a/pkgs/os-specific/linux/mdadm/default.nix +++ b/pkgs/os-specific/linux/mdadm/default.nix @@ -1,4 +1,4 @@ -{ stdenv, utillinux, coreutils, fetchurl, groff, system-sendmail }: +{ stdenv, util-linux, coreutils, fetchurl, groff, system-sendmail }: stdenv.mkDerivation rec { name = "mdadm-4.1"; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { -e 's@/usr/sbin/sendmail@${system-sendmail}/bin/sendmail@' -i Makefile sed -i \ -e 's@/usr/bin/basename@${coreutils}/bin/basename@g' \ - -e 's@BINDIR/blkid@${utillinux}/bin/blkid@g' \ + -e 's@BINDIR/blkid@${util-linux}/bin/blkid@g' \ *.rules ''; diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 81ec7e5a661..86b0981c5fa 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent +{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, util-linux, libcap, libtirpc, libevent , sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers , python3, buildPackages, nixosTests, rpcsvc-proto , enablePython ? true }: let - statdPath = lib.makeBinPath [ systemd utillinux coreutils ]; + statdPath = lib.makeBinPath [ systemd util-linux coreutils ]; in stdenv.mkDerivation rec { diff --git a/pkgs/os-specific/linux/open-iscsi/default.nix b/pkgs/os-specific/linux/open-iscsi/default.nix index 6314dcea62d..b8aa251489d 100644 --- a/pkgs/os-specific/linux/open-iscsi/default.nix +++ b/pkgs/os-specific/linux/open-iscsi/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, automake, autoconf, libtool, gettext -, utillinux, openisns, openssl, kmod, perl, systemd, pkgconf +, util-linux, openisns, openssl, kmod, perl, systemd, pkgconf }: stdenv.mkDerivation rec { @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { version = "2.1.2"; nativeBuildInputs = [ autoconf automake gettext libtool perl pkgconf ]; - buildInputs = [ kmod openisns.lib openssl systemd utillinux ]; + buildInputs = [ kmod openisns.lib openssl systemd util-linux ]; src = fetchFromGitHub { owner = "open-iscsi"; diff --git a/pkgs/os-specific/linux/openrazer/driver.nix b/pkgs/os-specific/linux/openrazer/driver.nix index a6bf67db098..ef96c7697e7 100644 --- a/pkgs/os-specific/linux/openrazer/driver.nix +++ b/pkgs/os-specific/linux/openrazer/driver.nix @@ -2,7 +2,7 @@ , fetchFromGitHub , kernel , stdenv -, utillinux +, util-linux }: let @@ -28,7 +28,7 @@ stdenv.mkDerivation (common // { substituteInPlace $RAZER_RULES_OUT \ --replace razer_mount $RAZER_MOUNT_OUT substituteInPlace $RAZER_MOUNT_OUT \ - --replace /usr/bin/logger ${utillinux}/bin/logger \ + --replace /usr/bin/logger ${util-linux}/bin/logger \ --replace chgrp ${coreutils}/bin/chgrp \ --replace "PATH='/sbin:/bin:/usr/sbin:/usr/bin'" "" ''; diff --git a/pkgs/os-specific/linux/openvswitch/default.nix b/pkgs/os-specific/linux/openvswitch/default.nix index 33b252a0225..84f8abf73b0 100644 --- a/pkgs/os-specific/linux/openvswitch/default.nix +++ b/pkgs/os-specific/linux/openvswitch/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper, pkgconfig, utillinux, which +{ stdenv, fetchurl, makeWrapper, pkgconfig, util-linux, which , procps, libcap_ng, openssl, python3 , perl , kernel ? null }: @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { kernel = optional (_kernel != null) _kernel.dev; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ makeWrapper utillinux openssl libcap_ng pythonEnv + buildInputs = [ makeWrapper util-linux openssl libcap_ng pythonEnv perl procps which ]; configureFlags = [ diff --git a/pkgs/os-specific/linux/openvswitch/lts.nix b/pkgs/os-specific/linux/openvswitch/lts.nix index 358a8b39917..54ecefc54b2 100644 --- a/pkgs/os-specific/linux/openvswitch/lts.nix +++ b/pkgs/os-specific/linux/openvswitch/lts.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper, pkgconfig, utillinux, which +{ stdenv, fetchurl, makeWrapper, pkgconfig, util-linux, which , procps, libcap_ng, openssl, python2, iproute , perl , automake, autoconf, libtool, kernel ? null }: @@ -20,7 +20,7 @@ in stdenv.mkDerivation rec { kernel = optional (_kernel != null) _kernel.dev; nativeBuildInputs = [ autoconf libtool automake pkgconfig ]; - buildInputs = [ makeWrapper utillinux openssl libcap_ng python2 + buildInputs = [ makeWrapper util-linux openssl libcap_ng python2 perl procps which ]; preConfigure = "./boot.sh"; diff --git a/pkgs/os-specific/linux/pam_mount/default.nix b/pkgs/os-specific/linux/pam_mount/default.nix index 3e026be6abb..ebfd896555a 100644 --- a/pkgs/os-specific/linux/pam_mount/default.nix +++ b/pkgs/os-specific/linux/pam_mount/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoreconfHook, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, utillinux }: +{ stdenv, fetchurl, autoreconfHook, pkgconfig, libtool, pam, libHX, libxml2, pcre, perl, openssl, cryptsetup, util-linux }: stdenv.mkDerivation rec { pname = "pam_mount"; @@ -16,12 +16,12 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/mtcrypt.c \ - --replace @@NIX_UTILLINUX@@ ${utillinux}/bin + --replace @@NIX_UTILLINUX@@ ${util-linux}/bin ''; nativeBuildInputs = [ autoreconfHook libtool pkgconfig ]; - buildInputs = [ pam libHX utillinux libxml2 pcre perl openssl cryptsetup ]; + buildInputs = [ pam libHX util-linux libxml2 pcre perl openssl cryptsetup ]; enableParallelBuilding = true; diff --git a/pkgs/os-specific/linux/pktgen/default.nix b/pkgs/os-specific/linux/pktgen/default.nix index 41db6e93661..a883935b7b9 100644 --- a/pkgs/os-specific/linux/pktgen/default.nix +++ b/pkgs/os-specific/linux/pktgen/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, meson, ninja, pkgconfig -, dpdk, libbsd, libpcap, lua5_3, numactl, utillinux +, dpdk, libbsd, libpcap, lua5_3, numactl, util-linux , gtk2, which, withGtk ? false }: @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { patches = [ ./configure.patch ]; postPatch = '' - substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${utillinux}/bin/lscpu + substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${util-linux}/bin/lscpu ''; postInstall = '' diff --git a/pkgs/os-specific/linux/pm-utils/default.nix b/pkgs/os-specific/linux/pm-utils/default.nix index 1d8314923d3..e685402d473 100644 --- a/pkgs/os-specific/linux/pm-utils/default.nix +++ b/pkgs/os-specific/linux/pm-utils/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl, coreutils, gnugrep, utillinux, kmod +{ stdenv, fetchurl, coreutils, gnugrep, util-linux, kmod , procps, kbd, dbus }: let binPath = stdenv.lib.makeBinPath - [ coreutils gnugrep utillinux kmod procps kbd dbus ]; + [ coreutils gnugrep util-linux kmod procps kbd dbus ]; sbinPath = stdenv.lib.makeSearchPathOutput "bin" "sbin" [ procps ]; diff --git a/pkgs/os-specific/linux/pmount/default.nix b/pkgs/os-specific/linux/pmount/default.nix index 63d0c88c1f8..01624bff535 100644 --- a/pkgs/os-specific/linux/pmount/default.nix +++ b/pkgs/os-specific/linux/pmount/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, intltool, ntfs3g, utillinux +{ stdenv, fetchurl, intltool, ntfs3g, util-linux , mediaDir ? "/media/" , lockDir ? "/var/lock/pmount" , whiteList ? "/etc/pmount.allow" @@ -16,14 +16,14 @@ stdenv.mkDerivation rec { sha256 = "db38fc290b710e8e9e9d442da2fb627d41e13b3ee80326c15cc2595ba00ea036"; }; - buildInputs = [ intltool utillinux ]; + buildInputs = [ intltool util-linux ]; configureFlags = [ "--with-media-dir=${mediaDir}" "--with-lock-dir=${lockDir}" "--with-whitelist=${whiteList}" - "--with-mount-prog=${utillinux}/bin/mount" - "--with-umount-prog=${utillinux}/bin/umount" + "--with-mount-prog=${util-linux}/bin/mount" + "--with-umount-prog=${util-linux}/bin/umount" "--with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g" ]; diff --git a/pkgs/os-specific/linux/prl-tools/default.nix b/pkgs/os-specific/linux/prl-tools/default.nix index e71dcb497a2..9b0e38198a3 100644 --- a/pkgs/os-specific/linux/prl-tools/default.nix +++ b/pkgs/os-specific/linux/prl-tools/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, makeWrapper, p7zip -, gawk, utillinux, xorg, glib, dbus-glib, zlib +, gawk, util-linux, xorg, glib, dbus-glib, zlib , kernel ? null, libsOnly ? false , undmg, fetchurl }: @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { kernelVersion = if libsOnly then "" else lib.getName kernel.name; kernelDir = if libsOnly then "" else "${kernel.dev}/lib/modules/${kernelVersion}"; - scriptPath = lib.concatStringsSep ":" (lib.optionals (!libsOnly) [ "${utillinux}/bin" "${gawk}/bin" ]); + scriptPath = lib.concatStringsSep ":" (lib.optionals (!libsOnly) [ "${util-linux}/bin" "${gawk}/bin" ]); buildPhase = '' if test -z "$libsOnly"; then diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 85c78ce1421..13b52b86ff4 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -18,7 +18,7 @@ # Mandatory dependencies , libcap -, utillinux +, util-linux , kbd , kmod @@ -277,9 +277,9 @@ stdenv.mkDerivation { "-Dkill-path=${coreutils}/bin/kill" "-Dkmod-path=${kmod}/bin/kmod" - "-Dsulogin-path=${utillinux}/bin/sulogin" - "-Dmount-path=${utillinux}/bin/mount" - "-Dumount-path=${utillinux}/bin/umount" + "-Dsulogin-path=${util-linux}/bin/sulogin" + "-Dmount-path=${util-linux}/bin/mount" + "-Dumount-path=${util-linux}/bin/umount" "-Dcreate-log-dirs=false" # Upstream uses cgroupsv2 by default. To support docker and other # container managers we still need v1. @@ -326,12 +326,12 @@ stdenv.mkDerivation { test -e $i substituteInPlace $i \ --replace /usr/bin/getent ${getent}/bin/getent \ - --replace /sbin/mkswap ${lib.getBin utillinux}/sbin/mkswap \ - --replace /sbin/swapon ${lib.getBin utillinux}/sbin/swapon \ - --replace /sbin/swapoff ${lib.getBin utillinux}/sbin/swapoff \ + --replace /sbin/mkswap ${lib.getBin util-linux}/sbin/mkswap \ + --replace /sbin/swapon ${lib.getBin util-linux}/sbin/swapon \ + --replace /sbin/swapoff ${lib.getBin util-linux}/sbin/swapoff \ --replace /bin/echo ${coreutils}/bin/echo \ --replace /bin/cat ${coreutils}/bin/cat \ - --replace /sbin/sulogin ${lib.getBin utillinux}/sbin/sulogin \ + --replace /sbin/sulogin ${lib.getBin util-linux}/sbin/sulogin \ --replace /sbin/modprobe ${lib.getBin kmod}/sbin/modprobe \ --replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck \ --replace /bin/plymouth /run/current-system/sw/bin/plymouth # To avoid dependency diff --git a/pkgs/os-specific/linux/tomb/default.nix b/pkgs/os-specific/linux/tomb/default.nix index ccf341e212f..9a21aab9f25 100644 --- a/pkgs/os-specific/linux/tomb/default.nix +++ b/pkgs/os-specific/linux/tomb/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, makeWrapper -, gettext, zsh, pinentry, cryptsetup, gnupg, utillinux, e2fsprogs, sudo +, gettext, zsh, pinentry, cryptsetup, gnupg, util-linux, e2fsprogs, sudo }: stdenv.mkDerivation rec { @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { install -Dm644 doc/tomb.1 $out/share/man/man1/tomb.1 wrapProgram $out/bin/tomb \ - --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry utillinux e2fsprogs ]} + --prefix PATH : $out/bin:${lib.makeBinPath [ cryptsetup gettext gnupg pinentry util-linux e2fsprogs ]} ''; meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/udisks/1-default.nix b/pkgs/os-specific/linux/udisks/1-default.nix index f8876e5d155..725706f9b0e 100644 --- a/pkgs/os-specific/linux/udisks/1-default.nix +++ b/pkgs/os-specific/linux/udisks/1-default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, pkgconfig, sg3_utils, udev, glib, dbus, dbus-glib , polkit, parted, lvm2, libatasmart, intltool, libuuid, mdadm -, libxslt, docbook_xsl, utillinux, libgudev }: +, libxslt, docbook_xsl, util-linux, libgudev }: stdenv.mkDerivation rec { name = "udisks-1.0.5"; @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { substituteInPlace src/main.c --replace \ "/sbin:/bin:/usr/sbin:/usr/bin" \ - "${utillinux}/bin:${mdadm}/sbin:/run/current-system/sw/bin:/run/current-system/sw/bin" + "${util-linux}/bin:${mdadm}/sbin:/run/current-system/sw/bin:/run/current-system/sw/bin" ''; buildInputs = diff --git a/pkgs/os-specific/linux/udisks/2-default.nix b/pkgs/os-specific/linux/udisks/2-default.nix index 3b502dbe48f..b47d31ab6fd 100644 --- a/pkgs/os-specific/linux/udisks/2-default.nix +++ b/pkgs/os-specific/linux/udisks/2-default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, fetchpatch, substituteAll, libtool, pkgconfig, gettext, gnused , gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which -, expat, libxslt, docbook_xsl, utillinux, mdadm, libgudev, libblockdev, parted +, expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted , gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43, autoconf, automake , xfsprogs, f2fs-tools, dosfstools, e2fsprogs, btrfs-progs, exfat, nilfs-utils, ntfs3g }: @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { (substituteAll { src = ./fix-paths.patch; bash = "${bash}/bin/bash"; - blkid = "${utillinux}/bin/blkid"; + blkid = "${util-linux}/bin/blkid"; false = "${coreutils}/bin/false"; mdadm = "${mdadm}/bin/mdadm"; sed = "${gnused}/bin/sed"; @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { src = ./force-path.patch; path = stdenv.lib.makeBinPath [ btrfs-progs coreutils dosfstools e2fsprogs exfat f2fs-tools nilfs-utils - xfsprogs ntfs3g parted utillinux + xfsprogs ntfs3g parted util-linux ]; }) diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix index 80fb7389877..5406dcf77eb 100644 --- a/pkgs/os-specific/linux/zfs/default.nix +++ b/pkgs/os-specific/linux/zfs/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchpatch -, autoreconfHook, utillinux, nukeReferences, coreutils +, autoreconfHook, util-linux, nukeReferences, coreutils , perl, buildPackages , configFile ? "all" @@ -50,11 +50,11 @@ let # The arrays must remain the same length, so we repeat a flag that is # already part of the command and therefore has no effect. substituteInPlace ./module/${optionalString isUnstable "os/linux/"}zfs/zfs_ctldir.c \ - --replace '"/usr/bin/env", "umount"' '"${utillinux}/bin/umount", "-n"' \ - --replace '"/usr/bin/env", "mount"' '"${utillinux}/bin/mount", "-n"' + --replace '"/usr/bin/env", "umount"' '"${util-linux}/bin/umount", "-n"' \ + --replace '"/usr/bin/env", "mount"' '"${util-linux}/bin/mount", "-n"' '' + optionalString buildUser '' - substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount" \ - --replace "/bin/mount" "${utillinux}/bin/mount" + substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${util-linux}/bin/umount" \ + --replace "/bin/mount" "${util-linux}/bin/mount" substituteInPlace ./lib/libshare/${optionalString isUnstable "os/linux/"}nfs.c --replace "/usr/sbin/exportfs" "${ # We don't *need* python support, but we set it like this to minimize closure size: # If it's disabled by default, no need to enable it, even if we have python enabled @@ -142,7 +142,7 @@ let postInstall = optionalString buildKernel '' # Add reference that cannot be detected due to compressed kernel module mkdir -p "$out/nix-support" - echo "${utillinux}" >> "$out/nix-support/extra-refs" + echo "${util-linux}" >> "$out/nix-support/extra-refs" '' + optionalString buildUser '' # Remove provided services as they are buggy rm $out/etc/systemd/system/zfs-import-*.service @@ -162,7 +162,7 @@ let ''; postFixup = let - path = "PATH=${makeBinPath [ coreutils gawk gnused gnugrep utillinux smartmontools sysstat ]}:$PATH"; + path = "PATH=${makeBinPath [ coreutils gawk gnused gnugrep util-linux smartmontools sysstat ]}:$PATH"; in '' for i in $out/libexec/zfs/zpool.d/*; do sed -i '2i${path}' $i diff --git a/pkgs/servers/apcupsd/default.nix b/pkgs/servers/apcupsd/default.nix index ad047ba31f8..bdbb77faf6c 100644 --- a/pkgs/servers/apcupsd/default.nix +++ b/pkgs/servers/apcupsd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, systemd, utillinux, coreutils, wall, hostname, man +{ stdenv, fetchurl, pkgconfig, systemd, util-linux, coreutils, wall, hostname, man , enableCgiScripts ? true, gd }: @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ utillinux man ] ++ stdenv.lib.optional enableCgiScripts gd; + buildInputs = [ util-linux man ] ++ stdenv.lib.optional enableCgiScripts gd; prePatch = '' sed -e "s,\$(INSTALL_PROGRAM) \$(STRIP),\$(INSTALL_PROGRAM)," \ diff --git a/pkgs/servers/asterisk/default.nix b/pkgs/servers/asterisk/default.nix index 9a393cdeb00..6e960bd92fe 100644 --- a/pkgs/servers/asterisk/default.nix +++ b/pkgs/servers/asterisk/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, fetchsvn, jansson, libedit, libxml2, libxslt, ncurses, openssl, sqlite, - utillinux, dmidecode, libuuid, newt, + util-linux, dmidecode, libuuid, newt, lua, speex, srtp, wget, curl, iksemel, pkgconfig }: @@ -14,7 +14,7 @@ let dmidecode libuuid newt lua speex srtp wget curl iksemel ]; - nativeBuildInputs = [ utillinux pkgconfig ]; + nativeBuildInputs = [ util-linux pkgconfig ]; patches = [ # We want the Makefile to install the default /var skeleton diff --git a/pkgs/servers/computing/torque/default.nix b/pkgs/servers/computing/torque/default.nix index 0941ca96922..de358a5d66f 100644 --- a/pkgs/servers/computing/torque/default.nix +++ b/pkgs/servers/computing/torque/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, openssl, flex, bison, pkgconfig, groff, libxml2, utillinux +{ stdenv, fetchFromGitHub, openssl, flex, bison, pkgconfig, groff, libxml2, util-linux , coreutils, file, libtool, which, boost, autoreconfHook }: @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { strictDeps = true; nativeBuildInputs = [ autoreconfHook pkgconfig flex bison libxml2 ]; buildInputs = [ - openssl groff libxml2 utillinux libtool + openssl groff libxml2 util-linux libtool which boost ]; diff --git a/pkgs/servers/hylafaxplus/default.nix b/pkgs/servers/hylafaxplus/default.nix index 9585ac46e5a..1bbaacd5844 100644 --- a/pkgs/servers/hylafaxplus/default.nix +++ b/pkgs/servers/hylafaxplus/default.nix @@ -15,7 +15,7 @@ , libtiff , psmisc , sharutils -, utillinux +, util-linux , zlib ## optional packages (using `null` disables some functionality) , jbigkit ? null @@ -76,7 +76,7 @@ stdenv.mkDerivation { libtiff psmisc # for `fuser` command sharutils # for `uuencode` command - utillinux # for `agetty` command + util-linux # for `agetty` command zlib jbigkit # optional lcms2 # optional diff --git a/pkgs/servers/matrix-appservice-discord/node-composition.nix b/pkgs/servers/matrix-appservice-discord/node-composition.nix index 42b6358224c..6080388b05e 100644 --- a/pkgs/servers/matrix-appservice-discord/node-composition.nix +++ b/pkgs/servers/matrix-appservice-discord/node-composition.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../development/node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-slack/node-composition.nix b/pkgs/servers/matrix-synapse/matrix-appservice-slack/node-composition.nix index 36da6132423..0f86a16aef5 100644 --- a/pkgs/servers/matrix-synapse/matrix-appservice-slack/node-composition.nix +++ b/pkgs/servers/matrix-synapse/matrix-appservice-slack/node-composition.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../../development/node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/servers/search/elasticsearch/6.x.nix b/pkgs/servers/search/elasticsearch/6.x.nix index 04e81fe150a..673167030dc 100644 --- a/pkgs/servers/search/elasticsearch/6.x.nix +++ b/pkgs/servers/search/elasticsearch/6.x.nix @@ -4,7 +4,7 @@ , fetchurl , makeWrapper , jre_headless -, utillinux, gnugrep, coreutils +, util-linux, gnugrep, coreutils , autoPatchelfHook , zlib }: @@ -35,7 +35,7 @@ stdenv.mkDerivation (rec { "ES_CLASSPATH=\"\$ES_CLASSPATH:$out/\$additional_classpath_directory/*\"" ''; - buildInputs = [ makeWrapper jre_headless utillinux ] + buildInputs = [ makeWrapper jre_headless util-linux ] ++ optional enableUnfree zlib; installPhase = '' @@ -45,7 +45,7 @@ stdenv.mkDerivation (rec { chmod -x $out/bin/*.* wrapProgram $out/bin/elasticsearch \ - --prefix PATH : "${makeBinPath [ utillinux gnugrep coreutils ]}" \ + --prefix PATH : "${makeBinPath [ util-linux gnugrep coreutils ]}" \ --set JAVA_HOME "${jre_headless}" wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}" diff --git a/pkgs/servers/search/elasticsearch/7.x.nix b/pkgs/servers/search/elasticsearch/7.x.nix index 73a947066bf..c3d50f8fbdd 100644 --- a/pkgs/servers/search/elasticsearch/7.x.nix +++ b/pkgs/servers/search/elasticsearch/7.x.nix @@ -4,7 +4,7 @@ , fetchurl , makeWrapper , jre_headless -, utillinux, gnugrep, coreutils +, util-linux, gnugrep, coreutils , autoPatchelfHook , zlib }: @@ -46,7 +46,7 @@ stdenv.mkDerivation (rec { "ES_CLASSPATH=\"\$ES_CLASSPATH:$out/\$additional_classpath_directory/*\"" ''; - buildInputs = [ makeWrapper jre_headless utillinux ] + buildInputs = [ makeWrapper jre_headless util-linux ] ++ optional enableUnfree zlib; installPhase = '' @@ -56,7 +56,7 @@ stdenv.mkDerivation (rec { chmod +x $out/bin/* wrapProgram $out/bin/elasticsearch \ - --prefix PATH : "${makeBinPath [ utillinux coreutils gnugrep ]}" \ + --prefix PATH : "${makeBinPath [ util-linux coreutils gnugrep ]}" \ --set JAVA_HOME "${jre_headless}" wrapProgram $out/bin/elasticsearch-plugin --set JAVA_HOME "${jre_headless}" diff --git a/pkgs/servers/web-apps/cryptpad/node-packages.nix b/pkgs/servers/web-apps/cryptpad/node-packages.nix index 19c034aa78b..208bb3c72c7 100644 --- a/pkgs/servers/web-apps/cryptpad/node-packages.nix +++ b/pkgs/servers/web-apps/cryptpad/node-packages.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../../development/node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/servers/xmpp/ejabberd/default.nix b/pkgs/servers/xmpp/ejabberd/default.nix index 2cf4d9465ae..f6a8f658039 100644 --- a/pkgs/servers/xmpp/ejabberd/default.nix +++ b/pkgs/servers/xmpp/ejabberd/default.nix @@ -1,5 +1,5 @@ { stdenv, writeScriptBin, makeWrapper, lib, fetchurl, git, cacert, libpng, libjpeg, libwebp -, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, utillinux, procps, gd +, erlang, openssl, expat, libyaml, bash, gnused, gnugrep, coreutils, util-linux, procps, gd , flock , withMysql ? false , withPgsql ? false @@ -21,7 +21,7 @@ let fi ''; - ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils utillinux procps ]; + ctlpath = lib.makeBinPath [ bash gnused gnugrep coreutils util-linux procps ]; in stdenv.mkDerivation rec { version = "20.03"; diff --git a/pkgs/servers/zigbee2mqtt/node.nix b/pkgs/servers/zigbee2mqtt/node.nix index 42b6358224c..6080388b05e 100644 --- a/pkgs/servers/zigbee2mqtt/node.nix +++ b/pkgs/servers/zigbee2mqtt/node.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../development/node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/servers/zoneminder/default.nix b/pkgs/servers/zoneminder/default.nix index 0bdaede49a5..657bbc8d664 100644 --- a/pkgs/servers/zoneminder/default.nix +++ b/pkgs/servers/zoneminder/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, fetchurl, fetchpatch, substituteAll, cmake, makeWrapper, pkgconfig , curl, ffmpeg_3, glib, libjpeg, libselinux, libsepol, mp4v2, libmysqlclient, mysql, pcre, perl, perlPackages -, polkit, utillinuxMinimal, x264, zlib +, polkit, util-linuxMinimal, x264, zlib , coreutils, procps, psmisc, nixosTests }: # NOTES: @@ -148,7 +148,7 @@ in stdenv.mkDerivation rec { buildInputs = [ curl ffmpeg_3 glib libjpeg libselinux libsepol mp4v2 libmysqlclient mysql.client pcre perl polkit x264 zlib - utillinuxMinimal # for libmount + util-linuxMinimal # for libmount ] ++ (with perlPackages; [ # build-time dependencies DateManip DBI DBDmysql LWP SysMmap diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index deeb4093c68..d06157fa77c 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -1,5 +1,5 @@ { stdenv, buildPackages -, fetchurl, binutils ? null, bison, autoconf, utillinux +, fetchurl, binutils ? null, bison, autoconf, util-linux # patch for cygwin requires readline support , interactive ? stdenv.isCygwin, readline70 ? null @@ -93,7 +93,7 @@ stdenv.mkDerivation rec { "SHOBJ_LIBS=-lbash" ]; - checkInputs = [ utillinux ]; + checkInputs = [ util-linux ]; doCheck = false; # dependency cycle, needs to be interactive postInstall = '' diff --git a/pkgs/shells/bash/5.0.nix b/pkgs/shells/bash/5.0.nix index 09030493fb6..7120910d79e 100644 --- a/pkgs/shells/bash/5.0.nix +++ b/pkgs/shells/bash/5.0.nix @@ -1,5 +1,5 @@ { stdenv, buildPackages -, fetchurl, binutils ? null, bison, utillinux +, fetchurl, binutils ? null, bison, util-linux # patch for cygwin requires readline support , interactive ? stdenv.isCygwin, readline80 ? null @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { "SHOBJ_LIBS=-lbash" ]; - checkInputs = [ utillinux ]; + checkInputs = [ util-linux ]; doCheck = false; # dependency cycle, needs to be interactive postInstall = '' diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 3faa7f99657..eabed40e8eb 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -2,7 +2,7 @@ , lib , fetchurl , coreutils -, utillinux +, util-linux , which , gnused , gnugrep @@ -178,7 +178,7 @@ let EOF '' + optionalString stdenv.isLinux '' - sed -e "s| ul| ${utillinux}/bin/ul|" \ + sed -e "s| ul| ${util-linux}/bin/ul|" \ -i "$out/share/fish/functions/__fish_print_help.fish" for cur in $out/share/fish/functions/*.fish; do sed -e "s|/usr/bin/getent|${getent}/bin/getent|" \ diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 7f46e017c36..3f1bf557ae8 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, callPackage, substituteAll, python3, pkgconfig, writeText , xorg, gtk3, glib, pango, cairo, gdk-pixbuf, atk -, wrapGAppsHook, xorgserver, getopt, xauth, utillinux, which +, wrapGAppsHook, xorgserver, getopt, xauth, util-linux, which , ffmpeg, x264, libvpx, libwebp, x265 , libfakeXinerama , gst_all_1, pulseaudio, gobject-introspection @@ -97,7 +97,7 @@ in buildPythonApplication rec { --set XPRA_INSTALL_PREFIX "$out" --set XPRA_COMMAND "$out/bin/xpra" --prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib - --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux pulseaudio ]} + --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which util-linux pulseaudio ]} ) ''; diff --git a/pkgs/tools/archivers/fsarchiver/default.nix b/pkgs/tools/archivers/fsarchiver/default.nix index 621e3f718e0..721accd93f0 100644 --- a/pkgs/tools/archivers/fsarchiver/default.nix +++ b/pkgs/tools/archivers/fsarchiver/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig , zlib, bzip2, lzma, lzo, lz4, zstd, xz -, libgcrypt, e2fsprogs, utillinux, libgpgerror }: +, libgcrypt, e2fsprogs, util-linux, libgpgerror }: let version = "0.8.5"; @@ -22,7 +22,7 @@ in stdenv.mkDerivation { buildInputs = [ zlib bzip2 lzma lzo lz4 zstd xz - libgcrypt e2fsprogs utillinux libgpgerror + libgcrypt e2fsprogs util-linux libgpgerror ]; meta = with stdenv.lib; { diff --git a/pkgs/tools/backup/btrbk/default.nix b/pkgs/tools/backup/btrbk/default.nix index 0c528bcea1e..6e450b11aa2 100644 --- a/pkgs/tools/backup/btrbk/default.nix +++ b/pkgs/tools/backup/btrbk/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, coreutils, bash, btrfs-progs, openssh, perl, perlPackages -, utillinux, asciidoc, asciidoctor, mbuffer, makeWrapper }: +, util-linux, asciidoc, asciidoctor, mbuffer, makeWrapper }: stdenv.mkDerivation rec { pname = "btrbk"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # Fix SSH filter script sed -i '/^export PATH/d' ssh_filter_btrbk.sh - substituteInPlace ssh_filter_btrbk.sh --replace logger ${utillinux}/bin/logger + substituteInPlace ssh_filter_btrbk.sh --replace logger ${util-linux}/bin/logger ''; preFixup = '' diff --git a/pkgs/tools/backup/duplicity/default.nix b/pkgs/tools/backup/duplicity/default.nix index c12cc1198c9..1f62834e4d1 100644 --- a/pkgs/tools/backup/duplicity/default.nix +++ b/pkgs/tools/backup/duplicity/default.nix @@ -7,7 +7,7 @@ , gnupg , gnutar , par2cmdline -, utillinux +, util-linux , rsync , backblaze-b2 , makeWrapper @@ -72,7 +72,7 @@ pythonPackages.buildPythonApplication rec { librsync # Add 'rdiff' to PATH. par2cmdline # Add 'par2' to PATH. ] ++ stdenv.lib.optionals stdenv.isLinux [ - utillinux # Add 'setsid' to PATH. + util-linux # Add 'setsid' to PATH. ] ++ (with pythonPackages; [ lockfile mock diff --git a/pkgs/tools/backup/ori/default.nix b/pkgs/tools/backup/ori/default.nix index e3b4a0fb537..9f00a7f2133 100644 --- a/pkgs/tools/backup/ori/default.nix +++ b/pkgs/tools/backup/ori/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, boost, pkgconfig, scons, utillinux, fuse, libevent, openssl, zlib }: +{ stdenv, fetchurl, boost, pkgconfig, scons, util-linux, fuse, libevent, openssl, zlib }: stdenv.mkDerivation { version = "0.8.1"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { }; buildInputs = [ - boost pkgconfig scons utillinux fuse libevent openssl zlib + boost pkgconfig scons util-linux fuse libevent openssl zlib ]; buildPhase = '' diff --git a/pkgs/tools/bluetooth/blueberry/default.nix b/pkgs/tools/bluetooth/blueberry/default.nix index 16563c38099..25e72c1b880 100644 --- a/pkgs/tools/bluetooth/blueberry/default.nix +++ b/pkgs/tools/bluetooth/blueberry/default.nix @@ -8,7 +8,7 @@ , intltool , pavucontrol , python3Packages -, utillinux +, util-linux , wrapGAppsHook }: @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { cinnamon.xapps gnome3.gnome-bluetooth python3Packages.python - utillinux + util-linux ]; pythonPath = with python3Packages; [ @@ -68,8 +68,8 @@ stdenv.mkDerivation rec { --replace /usr/lib/blueberry $out/lib/blueberry \ --replace /usr/share $out/share substituteInPlace $out/lib/blueberry/rfkillMagic.py \ - --replace /usr/bin/rfkill ${utillinux}/bin/rfkill \ - --replace /usr/sbin/rfkill ${utillinux}/bin/rfkill \ + --replace /usr/bin/rfkill ${util-linux}/bin/rfkill \ + --replace /usr/sbin/rfkill ${util-linux}/bin/rfkill \ --replace /usr/lib/blueberry $out/lib/blueberry substituteInPlace $out/share/applications/blueberry.desktop \ --replace Exec=blueberry Exec=$out/bin/blueberry diff --git a/pkgs/tools/cd-dvd/bashburn/default.nix b/pkgs/tools/cd-dvd/bashburn/default.nix index 9b232be8ce0..0acf55da7fe 100644 --- a/pkgs/tools/cd-dvd/bashburn/default.nix +++ b/pkgs/tools/cd-dvd/bashburn/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, utillinux +{ stdenv, fetchurl, util-linux , cdparanoia, cdrdao, dvdplusrwtools, flac, lame, mpg123, normalize , vorbis-tools, xorriso }: @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { name = "${pname}-${version}.tar.gz"; }; - nativeBuildInputs = [ utillinux ]; + nativeBuildInputs = [ util-linux ]; postPatch = '' for path in \ @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { BB_OGGENC=${vorbis-tools}/bin/oggenc \ BB_OGGDEC=${vorbis-tools}/bin/oggdec \ BB_FLACCMD=${flac.bin}/bin/flac \ - BB_EJECT=${utillinux}/bin/eject \ + BB_EJECT=${util-linux}/bin/eject \ BB_NORMCMD=${normalize}/bin/normalize \ ; do echo $path diff --git a/pkgs/tools/cd-dvd/unetbootin/default.nix b/pkgs/tools/cd-dvd/unetbootin/default.nix index ae9e6724fac..b935bc02d15 100644 --- a/pkgs/tools/cd-dvd/unetbootin/default.nix +++ b/pkgs/tools/cd-dvd/unetbootin/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, makeWrapper, qt4, utillinux, coreutils, which, qmake4Hook +{ stdenv, fetchFromGitHub, makeWrapper, qt4, util-linux, coreutils, which, qmake4Hook , p7zip, mtools, syslinux }: stdenv.mkDerivation rec { @@ -24,9 +24,9 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace unetbootin.cpp \ --replace /bin/df ${coreutils}/bin/df \ - --replace /sbin/blkid ${utillinux}/sbin/blkid \ - --replace /sbin/fdisk ${utillinux}/sbin/fdisk \ - --replace /sbin/sfdisk ${utillinux}/sbin/sfdisk \ + --replace /sbin/blkid ${util-linux}/sbin/blkid \ + --replace /sbin/fdisk ${util-linux}/sbin/fdisk \ + --replace /sbin/sfdisk ${util-linux}/sbin/sfdisk \ --replace /usr/bin/syslinux ${syslinux}/bin/syslinux \ --replace /usr/bin/extlinux ${syslinux}/sbin/extlinux \ --replace /usr/share/syslinux ${syslinux}/share/syslinux diff --git a/pkgs/tools/compression/pigz/default.nix b/pkgs/tools/compression/pigz/default.nix index 1953b793657..07c7bf95607 100644 --- a/pkgs/tools/compression/pigz/default.nix +++ b/pkgs/tools/compression/pigz/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, zlib, utillinux }: +{ stdenv, fetchurl, zlib, util-linux }: let name = "pigz"; version = "2.4"; @@ -13,7 +13,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [zlib] ++ stdenv.lib.optional stdenv.isLinux utillinux; + buildInputs = [zlib] ++ stdenv.lib.optional stdenv.isLinux util-linux; makeFlags = [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" ]; diff --git a/pkgs/tools/filesystems/bcache-tools/default.nix b/pkgs/tools/filesystems/bcache-tools/default.nix index c3b1759bcdd..6e39ff17458 100644 --- a/pkgs/tools/filesystems/bcache-tools/default.nix +++ b/pkgs/tools/filesystems/bcache-tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, utillinux, bash }: +{ stdenv, fetchurl, pkgconfig, util-linux, bash }: stdenv.mkDerivation rec { pname = "bcache-tools"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ utillinux ]; + buildInputs = [ util-linux ]; # * Remove broken install rules (they ignore $PREFIX) for stuff we don't need # anyway (it's distro specific stuff). diff --git a/pkgs/tools/filesystems/bees/default.nix b/pkgs/tools/filesystems/bees/default.nix index 82a9742c071..bdca893a136 100644 --- a/pkgs/tools/filesystems/bees/default.nix +++ b/pkgs/tools/filesystems/bees/default.nix @@ -1,4 +1,4 @@ -{ stdenv, runCommand, fetchFromGitHub, bash, btrfs-progs, coreutils, python3Packages, utillinux }: +{ stdenv, runCommand, fetchFromGitHub, bash, btrfs-progs, coreutils, python3Packages, util-linux }: let @@ -15,7 +15,7 @@ let buildInputs = [ btrfs-progs # for btrfs/ioctl.h - utillinux # for uuid.h + util-linux # for uuid.h ]; nativeBuildInputs = [ @@ -56,7 +56,8 @@ let in runCommand "bees-service" { - inherit bash bees coreutils utillinux; + inherit bash bees coreutils; + utillinux = util-linux; # needs to be a valid shell variable name btrfsProgs = btrfs-progs; # needs to be a valid shell variable name } '' mkdir -p -- "$out/bin" diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 7ada070aba6..07420bf2220 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -27,7 +27,7 @@ , nss ? null, nspr ? null # Linux Only Dependencies -, linuxHeaders, utillinux, libuuid, udev, keyutils, rdma-core, rabbitmq-c +, linuxHeaders, util-linux, libuuid, udev, keyutils, rdma-core, rabbitmq-c , libaio ? null, libxfs ? null, zfs ? null , ... }: @@ -148,7 +148,7 @@ in rec { malloc zlib openldap lttng-ust babeltrace gperf gtest cunit snappy rocksdb lz4 oathToolkit leveldb libnl libcap_ng rdkafka ] ++ optionals stdenv.isLinux [ - linuxHeaders utillinux libuuid udev keyutils optLibaio optLibxfs optZfs + linuxHeaders util-linux libuuid udev keyutils optLibaio optLibxfs optZfs # ceph 14 rdma-core rabbitmq-c ] ++ optionals hasRadosgw [ diff --git a/pkgs/tools/filesystems/fatresize/default.nix b/pkgs/tools/filesystems/fatresize/default.nix index 79551df00ee..c8366a96f07 100644 --- a/pkgs/tools/filesystems/fatresize/default.nix +++ b/pkgs/tools/filesystems/fatresize/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, parted, utillinux, pkg-config }: +{ stdenv, fetchFromGitHub, parted, util-linux, pkg-config }: stdenv.mkDerivation rec { @@ -12,10 +12,10 @@ stdenv.mkDerivation rec { sha256 = "1vhz84kxfyl0q7mkqn68nvzzly0a4xgzv76m6db0bk7xyczv1qr2"; }; - buildInputs = [ parted utillinux ]; + buildInputs = [ parted util-linux ]; nativeBuildInputs = [ pkg-config ]; - propagatedBuildInputs = [ parted utillinux ]; + propagatedBuildInputs = [ parted util-linux ]; meta = with stdenv.lib; { description = "The FAT16/FAT32 non-destructive resizer"; diff --git a/pkgs/tools/filesystems/glusterfs/default.nix b/pkgs/tools/filesystems/glusterfs/default.nix index e7028ec1249..f495b56e325 100644 --- a/pkgs/tools/filesystems/glusterfs/default.nix +++ b/pkgs/tools/filesystems/glusterfs/default.nix @@ -1,7 +1,7 @@ {stdenv, fetchurl, fuse, bison, flex_2_5_35, openssl, python3, ncurses, readline, autoconf, automake, libtool, pkgconfig, zlib, libaio, libxml2, acl, sqlite, liburcu, attr, makeWrapper, coreutils, gnused, gnugrep, which, - openssh, gawk, findutils, utillinux, lvm2, btrfs-progs, e2fsprogs, xfsprogs, systemd, + openssh, gawk, findutils, util-linux, lvm2, btrfs-progs, e2fsprogs, xfsprogs, systemd, rsync, glibc, rpcsvc-proto, libtirpc }: let @@ -24,7 +24,7 @@ let buildInputs = [ fuse bison flex_2_5_35 openssl ncurses readline autoconf automake libtool pkgconfig zlib libaio libxml2 - acl sqlite liburcu attr makeWrapper utillinux libtirpc + acl sqlite liburcu attr makeWrapper util-linux libtirpc (python3.withPackages (pkgs: [ pkgs.flask pkgs.prettytable @@ -56,7 +56,7 @@ let openssh # ssh rsync # rsync, e.g. for geo-replication systemd # systemctl - utillinux # mount umount + util-linux # mount umount which # which xfsprogs # xfs_info ]; @@ -76,9 +76,9 @@ stdenv.mkDerivation substituteInPlace libglusterfs/src/glusterfs/lvm-defaults.h \ --replace '/sbin/' '${lvm2}/bin/' substituteInPlace libglusterfs/src/glusterfs/compat.h \ - --replace '/bin/umount' '${utillinux}/bin/umount' + --replace '/bin/umount' '${util-linux}/bin/umount' substituteInPlace contrib/fuse-lib/mount-gluster-compat.h \ - --replace '/bin/mount' '${utillinux}/bin/mount' + --replace '/bin/mount' '${util-linux}/bin/mount' ''; # Note that the VERSION file is something that is present in release tarballs diff --git a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix index 6ba29cb98d4..15d6686fbc3 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix @@ -1,7 +1,7 @@ # FIXME: Unify with pkgs/development/python-modules/blivet/default.nix. { stdenv, fetchurl, buildPythonApplication, pykickstart, pyparted, pyblock -, libselinux, cryptsetup, multipath_tools, lsof, utillinux +, libselinux, cryptsetup, multipath_tools, lsof, util-linux , useNixUdev ? true, systemd ? null # useNixUdev is here for bw compatibility }: @@ -24,11 +24,11 @@ buildPythonApplication rec { sed -i -e 's|"multipath"|"${multipath_tools}/sbin/multipath"|' \ blivet/devicelibs/mpath.py blivet/devices.py sed -i -e '/"wipefs"/ { - s|wipefs|${utillinux.bin}/sbin/wipefs| + s|wipefs|${util-linux.bin}/sbin/wipefs| s/-f/--force/ }' blivet/formats/__init__.py sed -i -e 's|"lsof"|"${lsof}/bin/lsof"|' blivet/formats/fs.py - sed -i -r -e 's|"(u?mount)"|"${utillinux.bin}/bin/\1"|' blivet/util.py + sed -i -r -e 's|"(u?mount)"|"${util-linux.bin}/bin/\1"|' blivet/util.py sed -i -e '/find_library/,/find_library/ { c libudev = "${stdenv.lib.getLib systemd}/lib/libudev.so.1" }' blivet/pyudev.py diff --git a/pkgs/tools/filesystems/nixpart/0.4/default.nix b/pkgs/tools/filesystems/nixpart/0.4/default.nix index 1f672701d38..703d918f92a 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/default.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/default.nix @@ -13,7 +13,7 @@ let inherit stdenv fetchurl buildPythonApplication; inherit pykickstart pyparted pyblock cryptsetup libselinux multipath_tools; inherit useNixUdev; - inherit (pkgs) lsof utillinux systemd; + inherit (pkgs) lsof util-linux systemd; }; cryptsetup = import ./cryptsetup.nix { @@ -27,7 +27,7 @@ let lvm2 = import ./lvm2.nix { inherit stdenv fetchurl; - inherit (pkgs) fetchpatch pkgconfig utillinux systemd coreutils; + inherit (pkgs) fetchpatch pkgconfig util-linux systemd coreutils; }; multipath_tools = import ./multipath-tools.nix { @@ -37,7 +37,7 @@ let parted = import ./parted.nix { inherit stdenv fetchurl; - inherit (pkgs) fetchpatch utillinux readline libuuid gettext check lvm2; + inherit (pkgs) fetchpatch util-linux readline libuuid gettext check lvm2; }; pyblock = import ./pyblock.nix { diff --git a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix index fc0005a14d4..4369d659034 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, systemd, utillinux, coreutils }: +{ stdenv, fetchurl, fetchpatch, pkgconfig, systemd, util-linux, coreutils }: let v = "2.02.106"; @@ -60,7 +60,7 @@ stdenv.mkDerivation { postInstall = '' substituteInPlace $out/lib/udev/rules.d/13-dm-disk.rules \ - --replace $out/sbin/blkid ${utillinux.bin}/sbin/blkid + --replace $out/sbin/blkid ${util-linux.bin}/sbin/blkid # Systemd stuff mkdir -p $out/etc/systemd/system $out/lib/systemd/system-generators diff --git a/pkgs/tools/filesystems/nixpart/0.4/parted.nix b/pkgs/tools/filesystems/nixpart/0.4/parted.nix index 16f3a57ea14..7fe1b745466 100644 --- a/pkgs/tools/filesystems/nixpart/0.4/parted.nix +++ b/pkgs/tools/filesystems/nixpart/0.4/parted.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, fetchpatch, lvm2, libuuid, gettext, readline -, utillinux, check, enableStatic ? false }: +, util-linux, check, enableStatic ? false }: stdenv.mkDerivation rec { name = "parted-3.1"; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableStatic "--enable-static"; doCheck = true; - checkInputs = [ check utillinux ]; + checkInputs = [ check util-linux ]; meta = { description = "Create, destroy, resize, check, and copy partitions"; diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix index abe171170d4..2065e31e97a 100644 --- a/pkgs/tools/filesystems/ntfs-3g/default.nix +++ b/pkgs/tools/filesystems/ntfs-3g/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, utillinux, libuuid +{stdenv, fetchurl, util-linux, libuuid , crypto ? false, libgcrypt, gnutls, pkgconfig}: stdenv.mkDerivation rec { @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { substituteInPlace src/Makefile.in --replace /sbin '@sbindir@' substituteInPlace ntfsprogs/Makefile.in --replace /sbin '@sbindir@' substituteInPlace libfuse-lite/mount_util.c \ - --replace /bin/mount ${utillinux}/bin/mount \ - --replace /bin/umount ${utillinux}/bin/umount + --replace /bin/mount ${util-linux}/bin/mount \ + --replace /bin/umount ${util-linux}/bin/umount ''; configureFlags = [ diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix index 8f365d023d2..815129f7f0f 100644 --- a/pkgs/tools/misc/calamares/default.nix +++ b/pkgs/tools/misc/calamares/default.nix @@ -1,6 +1,6 @@ { lib, fetchurl, boost, cmake, extra-cmake-modules, kparts, kpmcore , kservice, libatasmart, libxcb, libyamlcpp, parted, polkit-qt, python, qtbase -, qtquickcontrols, qtsvg, qttools, qtwebengine, utillinux, glibc, tzdata +, qtquickcontrols, qtsvg, qttools, qtwebengine, util-linux, glibc, tzdata , ckbcomp, xkeyboard_config, mkDerivation }: @@ -17,7 +17,7 @@ mkDerivation rec { buildInputs = [ boost cmake extra-cmake-modules kparts.dev kpmcore.out kservice.dev libatasmart libxcb libyamlcpp parted polkit-qt python qtbase - qtquickcontrols qtsvg qttools qtwebengine.dev utillinux + qtquickcontrols qtsvg qttools qtwebengine.dev util-linux ]; enableParallelBuilding = false; diff --git a/pkgs/tools/misc/cloud-utils/default.nix b/pkgs/tools/misc/cloud-utils/default.nix index bd6d59c8a0c..1bd3def87c4 100644 --- a/pkgs/tools/misc/cloud-utils/default.nix +++ b/pkgs/tools/misc/cloud-utils/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, makeWrapper -, gawk, gnused, utillinux, file +, gawk, gnused, util-linux, file , wget, python3, qemu-utils, euca2ools , e2fsprogs, cdrkit , gptfdisk }: @@ -7,7 +7,7 @@ let # according to https://packages.debian.org/sid/cloud-image-utils + https://packages.debian.org/sid/admin/cloud-guest-utils guestDeps = [ - e2fsprogs gptfdisk gawk gnused utillinux + e2fsprogs gptfdisk gawk gnused util-linux ]; binDeps = guestDeps ++ [ wget file qemu-utils cdrkit diff --git a/pkgs/tools/misc/debootstrap/default.nix b/pkgs/tools/misc/debootstrap/default.nix index 2940ff0a573..4d4afb0b995 100644 --- a/pkgs/tools/misc/debootstrap/default.nix +++ b/pkgs/tools/misc/debootstrap/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, dpkg, gawk, perl, wget, coreutils, utillinux +{ stdenv, fetchurl, dpkg, gawk, perl, wget, coreutils, util-linux , gnugrep, gnutar, gnused, gzip, makeWrapper }: # USAGE like this: debootstrap sid /tmp/target-chroot-directory # There is also cdebootstrap now. Is that easier to maintain? @@ -33,7 +33,7 @@ in stdenv.mkDerivation rec { substituteInPlace debootstrap \ --replace 'CHROOT_CMD="chroot ' 'CHROOT_CMD="${coreutils}/bin/chroot ' \ - --replace 'CHROOT_CMD="unshare ' 'CHROOT_CMD="${utillinux}/bin/unshare ' \ + --replace 'CHROOT_CMD="unshare ' 'CHROOT_CMD="${util-linux}/bin/unshare ' \ --replace /usr/bin/dpkg ${dpkg}/bin/dpkg \ --replace '#!/bin/sh' '#!/bin/bash' \ --subst-var-by VERSION ${version} diff --git a/pkgs/tools/misc/etcher/default.nix b/pkgs/tools/misc/etcher/default.nix index fec78db979c..6634d2d23ca 100644 --- a/pkgs/tools/misc/etcher/default.nix +++ b/pkgs/tools/misc/etcher/default.nix @@ -3,7 +3,7 @@ , gcc-unwrapped , dpkg , polkit -, utillinux +, util-linux , bash , nodePackages , makeWrapper @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { # use Nix(OS) paths sed -i "s|/usr/bin/pkexec|/usr/bin/pkexec', '/run/wrappers/bin/pkexec|" tmp/node_modules/sudo-prompt/index.js sed -i 's|/bin/bash|${bash}/bin/bash|' tmp/node_modules/sudo-prompt/index.js - sed -i "s|'lsblk'|'${utillinux}/bin/lsblk'|" tmp/node_modules/drivelist/js/lsblk/index.js + sed -i "s|'lsblk'|'${util-linux}/bin/lsblk'|" tmp/node_modules/drivelist/js/lsblk/index.js sed -i "s|process.resourcesPath|'$out/share/${pname}/resources/'|" tmp/generated/gui.js ${nodePackages.asar}/bin/asar pack tmp opt/balenaEtcher/resources/app.asar rm -rf tmp diff --git a/pkgs/tools/misc/gparted/default.nix b/pkgs/tools/misc/gparted/default.nix index 6292fb4a722..7d610416da4 100644 --- a/pkgs/tools/misc/gparted/default.nix +++ b/pkgs/tools/misc/gparted/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, intltool, gettext, makeWrapper, coreutils, gnused, gnome3 , gnugrep, parted, glib, libuuid, pkgconfig, gtkmm3, libxml2 -, gpart, hdparm, procps, utillinux, polkit, wrapGAppsHook, substituteAll +, gpart, hdparm, procps, util-linux, polkit, wrapGAppsHook, substituteAll }: stdenv.mkDerivation rec { @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { preFixup = '' gappsWrapperArgs+=( - --prefix PATH : "${stdenv.lib.makeBinPath [ gpart hdparm utillinux procps coreutils gnused gnugrep ]}" + --prefix PATH : "${stdenv.lib.makeBinPath [ gpart hdparm util-linux procps coreutils gnused gnugrep ]}" ) ''; diff --git a/pkgs/tools/misc/memtest86-efi/default.nix b/pkgs/tools/misc/memtest86-efi/default.nix index c33aa074404..dc29aad2a54 100644 --- a/pkgs/tools/misc/memtest86-efi/default.nix +++ b/pkgs/tools/misc/memtest86-efi/default.nix @@ -1,7 +1,7 @@ { stdenv , lib , fetchzip -, utillinux +, util-linux , jq , mtools }: @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - utillinux + util-linux jq mtools ]; diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix index 56262d8171e..28ac3a82f0a 100644 --- a/pkgs/tools/misc/ostree/default.nix +++ b/pkgs/tools/misc/ostree/default.nix @@ -19,7 +19,7 @@ , automake , libtool , fuse -, utillinuxMinimal +, util-linuxMinimal , libselinux , libsodium , libarchive @@ -93,7 +93,7 @@ in stdenv.mkDerivation rec { libarchive bzip2 xz - utillinuxMinimal # for libmount + util-linuxMinimal # for libmount # for installed tests testPython diff --git a/pkgs/tools/misc/parted/default.nix b/pkgs/tools/misc/parted/default.nix index 808b0382f32..693e99c4645 100644 --- a/pkgs/tools/misc/parted/default.nix +++ b/pkgs/tools/misc/parted/default.nix @@ -9,7 +9,7 @@ , e2fsprogs , perl , python2 -, utillinux +, util-linux , check , enableStatic ? false }: @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { # Tests were previously failing due to Hydra running builds as uid 0. # That should hopefully be fixed now. doCheck = !stdenv.hostPlatform.isMusl; /* translation test */ - checkInputs = [ check dosfstools e2fsprogs perl python2 utillinux ]; + checkInputs = [ check dosfstools e2fsprogs perl python2 util-linux ]; meta = { description = "Create, destroy, resize, check, and copy partitions"; diff --git a/pkgs/tools/misc/partition-manager/default.nix b/pkgs/tools/misc/partition-manager/default.nix index 1b5f7dbdbec..1a779616ab8 100644 --- a/pkgs/tools/misc/partition-manager/default.nix +++ b/pkgs/tools/misc/partition-manager/default.nix @@ -1,7 +1,7 @@ { mkDerivation, fetchurl, lib , extra-cmake-modules, kdoctools, wrapGAppsHook, wrapQtAppsHook , kconfig, kcrash, kinit, kpmcore -, eject, libatasmart , utillinux, qtbase +, eject, libatasmart , util-linux, qtbase }: let @@ -20,7 +20,7 @@ in mkDerivation rec { nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook wrapQtAppsHook ]; # refer to kpmcore for the use of eject - buildInputs = [ eject libatasmart utillinux ]; + buildInputs = [ eject libatasmart util-linux ]; propagatedBuildInputs = [ kconfig kcrash kinit kpmcore ]; meta = with lib; { diff --git a/pkgs/tools/misc/profile-sync-daemon/default.nix b/pkgs/tools/misc/profile-sync-daemon/default.nix index 5c4a3301d27..b4497c4d7c8 100644 --- a/pkgs/tools/misc/profile-sync-daemon/default.nix +++ b/pkgs/tools/misc/profile-sync-daemon/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, utillinux, coreutils}: +{ stdenv, fetchurl, util-linux, coreutils}: stdenv.mkDerivation rec { version = "6.42"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # $HOME detection fails (and is unnecessary) sed -i '/^HOME/d' $out/bin/profile-sync-daemon substituteInPlace $out/bin/psd-overlay-helper \ - --replace "PATH=/usr/bin:/bin" "PATH=${utillinux.bin}/bin:${coreutils}/bin" \ + --replace "PATH=/usr/bin:/bin" "PATH=${util-linux.bin}/bin:${coreutils}/bin" \ --replace "sudo " "/run/wrappers/bin/sudo " ''; diff --git a/pkgs/tools/misc/rmlint/default.nix b/pkgs/tools/misc/rmlint/default.nix index 936c78b695d..36da8d0a463 100644 --- a/pkgs/tools/misc/rmlint/default.nix +++ b/pkgs/tools/misc/rmlint/default.nix @@ -14,7 +14,7 @@ , python3 , scons , sphinx -, utillinux +, util-linux , wrapGAppsHook , withGui ? false }: @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { sha256 = "15xfkcw1bkfyf3z8kl23k3rlv702m0h7ghqxvhniynvlwbgh6j2x"; }; - CFLAGS="-I${stdenv.lib.getDev utillinux}/include"; + CFLAGS="-I${stdenv.lib.getDev util-linux}/include"; nativeBuildInputs = [ pkgconfig @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { glib json-glib libelf - utillinux + util-linux ] ++ stdenv.lib.optionals withGui [ cairo gobject-introspection diff --git a/pkgs/tools/misc/rpm-ostree/default.nix b/pkgs/tools/misc/rpm-ostree/default.nix index 0ba72852c40..abca71febb9 100644 --- a/pkgs/tools/misc/rpm-ostree/default.nix +++ b/pkgs/tools/misc/rpm-ostree/default.nix @@ -33,7 +33,7 @@ , json_c , zchunk , libmodulemd -, utillinux +, util-linux , sqlite , cppunit }: @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { json_c zchunk libmodulemd - utillinux # for smartcols.pc + util-linux # for smartcols.pc sqlite cppunit ]; diff --git a/pkgs/tools/misc/snapper/default.nix b/pkgs/tools/misc/snapper/default.nix index 576e1d78074..177580c099b 100644 --- a/pkgs/tools/misc/snapper/default.nix +++ b/pkgs/tools/misc/snapper/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub , autoreconfHook, pkgconfig, docbook_xsl, libxslt, docbook_xml_dtd_45 , acl, attr, boost, btrfs-progs, dbus, diffutils, e2fsprogs, libxml2 -, lvm2, pam, python, utillinux, fetchpatch, json_c, nixosTests }: +, lvm2, pam, python, util-linux, fetchpatch, json_c, nixosTests }: stdenv.mkDerivation rec { pname = "snapper"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ acl attr boost btrfs-progs dbus diffutils e2fsprogs libxml2 - lvm2 pam python utillinux json_c + lvm2 pam python util-linux json_c ]; passthru.tests.snapper = nixosTests.snapper; diff --git a/pkgs/tools/misc/tlp/default.nix b/pkgs/tools/misc/tlp/default.nix index a32e941ad84..b39f631f95b 100644 --- a/pkgs/tools/misc/tlp/default.nix +++ b/pkgs/tools/misc/tlp/default.nix @@ -16,7 +16,7 @@ , shellcheck , smartmontools , systemd -, utillinux +, util-linux , x86_energy_perf_policy # RDW only works with NetworkManager, and thus is optional with default off , enableRDW ? false @@ -86,7 +86,7 @@ perl smartmontools systemd - utillinux + util-linux ] ++ lib.optional enableRDW networkmanager ++ lib.optional (lib.any (lib.meta.platformMatch stdenv.hostPlatform) x86_energy_perf_policy.meta.platforms) x86_energy_perf_policy ); diff --git a/pkgs/tools/misc/woeusb/default.nix b/pkgs/tools/misc/woeusb/default.nix index 4c235b4866f..fddb98d8dc3 100644 --- a/pkgs/tools/misc/woeusb/default.nix +++ b/pkgs/tools/misc/woeusb/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, autoreconfHook, makeWrapper -, coreutils, dosfstools, findutils, gawk, gnugrep, grub2_light, ncurses, ntfs3g, parted, p7zip, utillinux, wget +, coreutils, dosfstools, findutils, gawk, gnugrep, grub2_light, ncurses, ntfs3g, parted, p7zip, util-linux, wget , wxGTK30 }: stdenv.mkDerivation rec { @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { # should be patched with a less useless default PATH, but for now # we add everything we need manually. wrapProgram "$out/bin/woeusb" \ - --set PATH '${stdenv.lib.makeBinPath [ coreutils dosfstools findutils gawk gnugrep grub2_light ncurses ntfs3g parted utillinux wget p7zip ]}' + --set PATH '${stdenv.lib.makeBinPath [ coreutils dosfstools findutils gawk gnugrep grub2_light ncurses ntfs3g parted util-linux wget p7zip ]}' ''; doInstallCheck = true; diff --git a/pkgs/tools/misc/xfstests/default.nix b/pkgs/tools/misc/xfstests/default.nix index 5f6d2bb1278..3bc01048c1e 100644 --- a/pkgs/tools/misc/xfstests/default.nix +++ b/pkgs/tools/misc/xfstests/default.nix @@ -1,7 +1,7 @@ { stdenv, acl, attr, autoconf, automake, bash, bc, coreutils, e2fsprogs , fetchgit, fio, gawk, keyutils, killall, lib, libaio, libcap, libtool , libuuid, libxfs, lvm2, openssl, perl, procps, quota -, time, utillinux, which, writeScript, xfsprogs, runtimeShell }: +, time, util-linux, which, writeScript, xfsprogs, runtimeShell }: stdenv.mkDerivation { name = "xfstests-2019-09-08"; @@ -96,7 +96,7 @@ stdenv.mkDerivation { export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk keyutils libcap lvm2 perl procps killall quota - utillinux which xfsprogs]}:$PATH + util-linux which xfsprogs]}:$PATH exec ./check "$@" ''; diff --git a/pkgs/tools/misc/xvfb-run/default.nix b/pkgs/tools/misc/xvfb-run/default.nix index 04c1902f3a0..02a2d67de53 100644 --- a/pkgs/tools/misc/xvfb-run/default.nix +++ b/pkgs/tools/misc/xvfb-run/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, makeWrapper, xorgserver, getopt -, xauth, utillinux, which, fontsConf, gawk, coreutils }: +, xauth, util-linux, which, fontsConf, gawk, coreutils }: let xvfb_run = fetchurl { name = "xvfb-run"; @@ -19,7 +19,7 @@ stdenv.mkDerivation { patchShebangs $out/bin/xvfb-run wrapProgram $out/bin/xvfb-run \ --set FONTCONFIG_FILE "${fontsConf}" \ - --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux gawk coreutils ]} + --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which util-linux gawk coreutils ]} ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/networking/airfield/node.nix b/pkgs/tools/networking/airfield/node.nix index e306e49c849..055fc5267c3 100644 --- a/pkgs/tools/networking/airfield/node.nix +++ b/pkgs/tools/networking/airfield/node.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../../development/node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/tools/networking/bud/default.nix b/pkgs/tools/networking/bud/default.nix index a79cbdc8bbd..724d25d49f9 100644 --- a/pkgs/tools/networking/bud/default.nix +++ b/pkgs/tools/networking/bud/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchgit, python, gyp, utillinux }: +{ stdenv, lib, fetchgit, python, gyp, util-linux }: stdenv.mkDerivation { pname = "bud"; @@ -13,7 +13,7 @@ stdenv.mkDerivation { buildInputs = [ python gyp - ] ++ lib.optional stdenv.isLinux utillinux; + ] ++ lib.optional stdenv.isLinux util-linux; buildPhase = '' python ./gyp_bud -f make diff --git a/pkgs/tools/networking/cjdns/default.nix b/pkgs/tools/networking/cjdns/default.nix index 438f107c27c..28a418c27f2 100644 --- a/pkgs/tools/networking/cjdns/default.nix +++ b/pkgs/tools/networking/cjdns/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux, nixosTests }: +{ stdenv, fetchFromGitHub, nodejs, which, python27, util-linux, nixosTests }: stdenv.mkDerivation rec { pname = "cjdns"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildInputs = [ which python27 nodejs ] ++ # for flock - stdenv.lib.optional stdenv.isLinux utillinux; + stdenv.lib.optional stdenv.isLinux util-linux; CFLAGS = "-O2 -Wno-error=stringop-truncation"; buildPhase = diff --git a/pkgs/tools/networking/openvpn/default.nix b/pkgs/tools/networking/openvpn/default.nix index 1df6260a09c..04ac9700310 100644 --- a/pkgs/tools/networking/openvpn/default.nix +++ b/pkgs/tools/networking/openvpn/default.nix @@ -9,7 +9,7 @@ , pam , useSystemd ? stdenv.isLinux , systemd ? null -, utillinux ? null +, util-linux ? null , pkcs11Support ? false , pkcs11helper ? null }: @@ -63,7 +63,7 @@ let '' + optionalString useSystemd '' install -Dm555 ${update-resolved} $out/libexec/update-systemd-resolved wrapProgram $out/libexec/update-systemd-resolved \ - --prefix PATH : ${makeBinPath [ runtimeShell iproute systemd utillinux ]} + --prefix PATH : ${makeBinPath [ runtimeShell iproute systemd util-linux ]} ''; enableParallelBuilding = true; diff --git a/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix b/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix index d73b8e911b9..f50d17eaf7d 100644 --- a/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix +++ b/pkgs/tools/networking/openvpn/openvpn_learnaddress.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, makeWrapper, coreutils, gawk, utillinux }: +{ stdenv, fetchgit, makeWrapper, coreutils, gawk, util-linux }: stdenv.mkDerivation { name = "openvpn-learnaddress-19b03c3"; @@ -9,13 +9,13 @@ stdenv.mkDerivation { sha256 = "16pcyvyhwsx34i0cjkkx906lmrwdd9gvznvqdwlad4ha8l8f8z42"; }; - buildInputs = [ makeWrapper coreutils gawk utillinux ]; + buildInputs = [ makeWrapper coreutils gawk util-linux ]; installPhase = '' install -Dm555 ovpn-learnaddress $out/libexec/openvpn/openvpn-learnaddress wrapProgram $out/libexec/openvpn/openvpn-learnaddress \ - --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gawk utillinux ]} + --prefix PATH : ${stdenv.lib.makeBinPath [ coreutils gawk util-linux ]} ''; meta = { diff --git a/pkgs/tools/networking/openvpn/update-systemd-resolved.nix b/pkgs/tools/networking/openvpn/update-systemd-resolved.nix index 4d18372363b..1a192ce6688 100644 --- a/pkgs/tools/networking/openvpn/update-systemd-resolved.nix +++ b/pkgs/tools/networking/openvpn/update-systemd-resolved.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub , makeWrapper -, iproute, systemd, coreutils, utillinux }: +, iproute, systemd, coreutils, util-linux }: stdenv.mkDerivation rec { pname = "update-systemd-resolved"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { installPhase = '' wrapProgram $out/libexec/openvpn/update-systemd-resolved \ - --prefix PATH : ${lib.makeBinPath [ iproute systemd coreutils utillinux ]} + --prefix PATH : ${lib.makeBinPath [ iproute systemd coreutils util-linux ]} ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/networking/shorewall/default.nix b/pkgs/tools/networking/shorewall/default.nix index 67f81b82105..c56f0eac7ff 100644 --- a/pkgs/tools/networking/shorewall/default.nix +++ b/pkgs/tools/networking/shorewall/default.nix @@ -10,7 +10,7 @@ , perlPackages , stdenv , tree -, utillinux +, util-linux }: let PATH = stdenv.lib.concatStringsSep ":" @@ -19,7 +19,7 @@ let "${iptables}/bin" "${ipset}/bin" "${ebtables}/bin" - "${utillinux}/bin" + "${util-linux}/bin" "${gnugrep}/bin" "${gnused}/bin" ]; @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { ipset iptables ebtables - utillinux + util-linux gnugrep gnused perl diff --git a/pkgs/tools/networking/tgt/default.nix b/pkgs/tools/networking/tgt/default.nix index 478c1ed35f2..d9d8478e985 100644 --- a/pkgs/tools/networking/tgt/default.nix +++ b/pkgs/tools/networking/tgt/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, libxslt, libaio, systemd, perl, perlPackages -, docbook_xsl, coreutils, lsof, rdma-core, makeWrapper, sg3_utils, utillinux +, docbook_xsl, coreutils, lsof, rdma-core, makeWrapper, sg3_utils, util-linux }: stdenv.mkDerivation rec { diff --git a/pkgs/tools/package-management/nixui/nixui.nix b/pkgs/tools/package-management/nixui/nixui.nix index e306e49c849..055fc5267c3 100644 --- a/pkgs/tools/package-management/nixui/nixui.nix +++ b/pkgs/tools/package-management/nixui/nixui.nix @@ -6,7 +6,7 @@ let nodeEnv = import ../../../development/node-packages/node-env.nix { - inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile; + inherit (pkgs) stdenv python2 util-linux runCommand writeTextFile; inherit nodejs; libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null; }; diff --git a/pkgs/tools/security/ecryptfs/default.nix b/pkgs/tools/security/ecryptfs/default.nix index e4caa9c4e18..1a8329885ba 100644 --- a/pkgs/tools/security/ecryptfs/default.nix +++ b/pkgs/tools/security/ecryptfs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, perl, utillinux, keyutils, nss, nspr, python2, pam, enablePython ? false +{ stdenv, fetchurl, pkgconfig, perl, util-linux, keyutils, nss, nspr, python2, pam, enablePython ? false , intltool, makeWrapper, coreutils, bash, gettext, cryptsetup, lvm2, rsync, which, lsof }: stdenv.mkDerivation rec { @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { FILES="$(grep -r '/bin/sh' src/utils -l; find src -name \*.c)" for file in $FILES; do substituteInPlace "$file" \ - --replace /bin/mount ${utillinux}/bin/mount \ - --replace /bin/umount ${utillinux}/bin/umount \ + --replace /bin/mount ${util-linux}/bin/mount \ + --replace /bin/umount ${util-linux}/bin/umount \ --replace /sbin/mount.ecryptfs_private ${wrapperDir}/mount.ecryptfs_private \ --replace /sbin/umount.ecryptfs_private ${wrapperDir}/umount.ecryptfs_private \ --replace /sbin/mount.ecryptfs $out/sbin/mount.ecryptfs \ diff --git a/pkgs/tools/security/pass/rofi-pass.nix b/pkgs/tools/security/pass/rofi-pass.nix index b3c08648862..d46aac93e86 100644 --- a/pkgs/tools/security/pass/rofi-pass.nix +++ b/pkgs/tools/security/pass/rofi-pass.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pass, rofi, coreutils, utillinux, xdotool, gnugrep +{ stdenv, fetchFromGitHub, pass, rofi, coreutils, util-linux, xdotool, gnugrep , libnotify, pwgen, findutils, gawk, gnused, xclip, makeWrapper }: @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { (pass.withExtensions (ext: [ ext.pass-otp ])) pwgen rofi - utillinux + util-linux xclip xdotool ]; diff --git a/pkgs/tools/security/scrypt/default.nix b/pkgs/tools/security/scrypt/default.nix index 66b5afc9a9b..e230b2ee457 100644 --- a/pkgs/tools/security/scrypt/default.nix +++ b/pkgs/tools/security/scrypt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, utillinux, getconf }: +{ stdenv, fetchurl, openssl, util-linux, getconf }: stdenv.mkDerivation rec { pname = "scrypt"; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { doCheck = true; checkTarget = "test"; - checkInputs = [ utillinux ]; + checkInputs = [ util-linux ]; meta = with stdenv.lib; { description = "Encryption utility"; diff --git a/pkgs/tools/system/facter/default.nix b/pkgs/tools/system/facter/default.nix index f9ea99432bf..2a101bba886 100644 --- a/pkgs/tools/system/facter/default.nix +++ b/pkgs/tools/system/facter/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, utillinux }: +{ stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, util-linux }: stdenv.mkDerivation rec { pname = "facter"; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ cmake ]; - buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby utillinux ]; + buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby util-linux ]; enableParallelBuilding = true; diff --git a/pkgs/tools/system/inxi/default.nix b/pkgs/tools/system/inxi/default.nix index 4257e2f2fd1..e5747a09f9c 100644 --- a/pkgs/tools/system/inxi/default.nix +++ b/pkgs/tools/system/inxi/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper , ps, dnsutils # dig is recommended for multiple categories , withRecommends ? false # Install (almost) all recommended tools (see --recommends) -, withRecommendedSystemPrograms ? withRecommends, utillinuxMinimal, dmidecode +, withRecommendedSystemPrograms ? withRecommends, util-linuxMinimal, dmidecode , file, hddtemp, iproute, ipmitool, usbutils, kmod, lm_sensors, smartmontools , binutils, tree, upower , withRecommendedDisplayInformationPrograms ? withRecommends, glxinfo, xorg @@ -11,7 +11,7 @@ let prefixPath = programs: "--prefix PATH ':' '${stdenv.lib.makeBinPath programs}'"; recommendedSystemPrograms = lib.optionals withRecommendedSystemPrograms [ - utillinuxMinimal dmidecode file hddtemp iproute ipmitool usbutils kmod + util-linuxMinimal dmidecode file hddtemp iproute ipmitool usbutils kmod lm_sensors smartmontools binutils tree upower ]; recommendedDisplayInformationPrograms = lib.optionals diff --git a/pkgs/tools/system/rofi-systemd/default.nix b/pkgs/tools/system/rofi-systemd/default.nix index 92c13527c6f..7d4ea120a8e 100644 --- a/pkgs/tools/system/rofi-systemd/default.nix +++ b/pkgs/tools/system/rofi-systemd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rofi, systemd, coreutils, utillinux, gawk, makeWrapper +{ stdenv, fetchFromGitHub, rofi, systemd, coreutils, util-linux, gawk, makeWrapper }: stdenv.mkDerivation rec { @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { wrapperPath = with stdenv.lib; makeBinPath [ rofi coreutils - utillinux + util-linux gawk systemd ]; diff --git a/pkgs/tools/virtualization/alpine-make-vm-image/default.nix b/pkgs/tools/virtualization/alpine-make-vm-image/default.nix index 08d37a1d53b..d6dad6433e7 100644 --- a/pkgs/tools/virtualization/alpine-make-vm-image/default.nix +++ b/pkgs/tools/virtualization/alpine-make-vm-image/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchFromGitHub, makeWrapper , apk-tools, coreutils, e2fsprogs, findutils, gnugrep, gnused, kmod, qemu-utils -, utillinux +, util-linux }: stdenv.mkDerivation rec { @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { postInstall = '' wrapProgram $out/bin/alpine-make-vm-image --set PATH ${lib.makeBinPath [ apk-tools coreutils e2fsprogs findutils gnugrep gnused kmod qemu-utils - utillinux + util-linux ]} ''; diff --git a/pkgs/tools/virtualization/google-compute-engine/default.nix b/pkgs/tools/virtualization/google-compute-engine/default.nix index 34f2bc9e190..be62ace4797 100644 --- a/pkgs/tools/virtualization/google-compute-engine/default.nix +++ b/pkgs/tools/virtualization/google-compute-engine/default.nix @@ -4,7 +4,7 @@ , bash , bashInteractive , systemd -, utillinux +, util-linux , boto , setuptools , distro @@ -31,14 +31,14 @@ buildPythonApplication rec { substituteInPlace "$file" \ --replace /bin/systemctl "/run/current-system/systemd/bin/systemctl" \ --replace /bin/bash "${bashInteractive}/bin/bash" \ - --replace /sbin/hwclock "${utillinux}/bin/hwclock" + --replace /sbin/hwclock "${util-linux}/bin/hwclock" # SELinux tool ??? /sbin/restorecon done substituteInPlace google_config/udev/64-gce-disk-removal.rules \ --replace /bin/sh "${bash}/bin/sh" \ - --replace /bin/umount "${utillinux}/bin/umount" \ - --replace /usr/bin/logger "${utillinux}/bin/logger" + --replace /bin/umount "${util-linux}/bin/umount" \ + --replace /usr/bin/logger "${util-linux}/bin/logger" ''; postInstall = '' diff --git a/pkgs/tools/virtualization/nixos-container/default.nix b/pkgs/tools/virtualization/nixos-container/default.nix index 32a7c1e2c33..badd25b4e24 100644 --- a/pkgs/tools/virtualization/nixos-container/default.nix +++ b/pkgs/tools/virtualization/nixos-container/default.nix @@ -1,4 +1,4 @@ -{ substituteAll, perlPackages, shadow, utillinux }: +{ substituteAll, perlPackages, shadow, util-linux }: substituteAll { name = "nixos-container"; @@ -7,7 +7,7 @@ substituteAll { src = ./nixos-container.pl; perl = "${perlPackages.perl}/bin/perl -I${perlPackages.FileSlurp}/${perlPackages.perl.libPrefix}"; su = "${shadow.su}/bin/su"; - inherit utillinux; + utillinux = util-linux; postInstall = '' t=$out/share/bash-completion/completions diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 078d4bc2eca..9187b127c93 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -491,7 +491,7 @@ mapAliases ({ retroshare06 = retroshare; gtk-recordmydesktop = throw "gtk-recordmydesktop has been removed from nixpkgs, as it's unmaintained and uses deprecated libraries"; # added 2019-12-10 qt-recordmydesktop = throw "qt-recordmydesktop has been removed from nixpkgs, as it's abandoned and uses deprecated libraries"; # added 2019-12-10 - rfkill = throw "rfkill has been removed, as it's included in utillinux"; # added 2020-08-23 + rfkill = throw "rfkill has been removed, as it's included in util-linux"; # added 2020-08-23 riak-cs = throw "riak-cs is not maintained anymore"; # added 2020-10-14 rkt = throw "rkt was archived by upstream"; # added 2020-05-16 ruby_2_0_0 = throw "ruby_2_0_0 was deprecated on 2018-02-13: use a newer version of ruby"; @@ -642,6 +642,7 @@ mapAliases ({ unicorn-emu = unicorn; # added 2020-10-29 usb_modeswitch = usb-modeswitch; # added 2016-05-10 usbguard-nox = usbguard; # added 2019-09-04 + utillinux = util-linux; # added 2020-11-24 uzbl = throw "uzbl has been removed from nixpkgs, as it's unmaintained and uses insecure libraries"; v4l_utils = v4l-utils; # added 2019-08-07 v8_3_16_14 = throw "v8_3_16_14 was removed in 2019-11-01: no longer referenced by other packages"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 92e68417e47..c6fbfb05243 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2647,7 +2647,7 @@ in mstflint = callPackage ../tools/misc/mstflint { }; mcelog = callPackage ../os-specific/linux/mcelog { - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; }; sqlint = callPackage ../development/tools/sqlint { }; @@ -3631,21 +3631,21 @@ in elk7Version = "7.5.1"; elasticsearch6 = callPackage ../servers/search/elasticsearch/6.x.nix { - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; jre_headless = jre8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; elasticsearch6-oss = callPackage ../servers/search/elasticsearch/6.x.nix { enableUnfree = false; - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; jre_headless = jre8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; elasticsearch7 = callPackage ../servers/search/elasticsearch/7.x.nix { - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; jre_headless = jre8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; elasticsearch7-oss = callPackage ../servers/search/elasticsearch/7.x.nix { enableUnfree = false; - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; jre_headless = jre8_headless; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731 }; elasticsearch = elasticsearch6; @@ -13064,7 +13064,7 @@ in gnutls = callPackage ../development/libraries/gnutls/default.nix { inherit (darwin.apple_sdk.frameworks) Security; - utillinux = utillinuxMinimal; # break the cyclic dependency + util-linux = util-linuxMinimal; # break the cyclic dependency }; gnutls-kdh = callPackage ../development/libraries/gnutls-kdh/3.5.nix { @@ -17875,7 +17875,7 @@ in libossp_uuid = callPackage ../development/libraries/libossp-uuid { }; libuuid = if stdenv.isLinux - then utillinuxMinimal + then util-linuxMinimal else null; light = callPackage ../os-specific/linux/light { }; @@ -17908,7 +17908,7 @@ in }; fusePackages = dontRecurseIntoAttrs (callPackage ../os-specific/linux/fuse { - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; }); fuse = lowPrio fusePackages.fuse_2; fuse3 = fusePackages.fuse_3; @@ -18960,7 +18960,7 @@ in systemd = callPackage ../os-specific/linux/systemd { # break some cyclic dependencies - utillinux = utillinuxMinimal; + util-linux = util-linuxMinimal; # provide a super minimal gnupg used for systemd-machined gnupg = callPackage ../tools/security/gnupg/22.nix { enableMinimal = true; @@ -19080,7 +19080,7 @@ in stdenv = crossLibcStdenv; }; - eudev = callPackage ../os-specific/linux/eudev { utillinux = utillinuxMinimal; }; + eudev = callPackage ../os-specific/linux/eudev { util-linux = util-linuxMinimal; }; libudev0-shim = callPackage ../os-specific/linux/libudev0-shim { }; @@ -19104,17 +19104,17 @@ in usermount = callPackage ../os-specific/linux/usermount { }; - utillinux = if stdenv.isLinux then callPackage ../os-specific/linux/util-linux { } - else unixtools.utillinux; + util-linux = if stdenv.isLinux then callPackage ../os-specific/linux/util-linux { } + else unixtools.util-linux; - utillinuxCurses = utillinux; + util-linuxCurses = util-linux; - utillinuxMinimal = if stdenv.isLinux then appendToName "minimal" (utillinux.override { + util-linuxMinimal = if stdenv.isLinux then appendToName "minimal" (util-linux.override { minimal = true; ncurses = null; perl = null; systemd = null; - }) else utillinux; + }) else util-linux; v4l-utils = qt5.callPackage ../os-specific/linux/v4l-utils { }; diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix index 41aa86a8c46..5e591ec7a85 100644 --- a/pkgs/top-level/release-small.nix +++ b/pkgs/top-level/release-small.nix @@ -160,8 +160,8 @@ with import ./release-lib.nix { inherit supportedSystems nixpkgsArgs; }; udev = linux; unzip = all; usbutils = linux; - utillinux = linux; - utillinuxMinimal = linux; + util-linux = linux; + util-linuxMinimal = linux; w3m = all; webkitgtk = linux; wget = all; diff --git a/pkgs/top-level/unix-tools.nix b/pkgs/top-level/unix-tools.nix index cdad9de61f4..b4f708ad565 100644 --- a/pkgs/top-level/unix-tools.nix +++ b/pkgs/top-level/unix-tools.nix @@ -55,15 +55,15 @@ let darwin = pkgs.darwin.network_cmds; }; col = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.text_cmds; }; column = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.netbsd.column; }; eject = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; }; getconf = { linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.stdenv.cc.libc @@ -76,19 +76,19 @@ let darwin = pkgs.netbsd.getent; }; getopt = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.getopt; }; fdisk = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.diskdev_cmds; }; fsck = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.diskdev_cmds; }; hexdump = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.shell_cmds; }; hostname = { @@ -108,14 +108,14 @@ let darwin = pkgs.netbsd.locale; }; logger = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; }; more = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = more_compat; }; mount = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.diskdev_cmds; }; netstat = { @@ -139,7 +139,7 @@ let darwin = pkgs.darwin.network_cmds; }; script = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.shell_cmds; }; sysctl = { @@ -151,15 +151,15 @@ let darwin = pkgs.darwin.top; }; umount = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.diskdev_cmds; }; whereis = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.shell_cmds; }; wall = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; }; watch = { linux = pkgs.procps; @@ -169,7 +169,7 @@ let darwin = pkgs.callPackage ../os-specific/linux/procps-ng {}; }; write = { - linux = pkgs.utillinux; + linux = pkgs.util-linux; darwin = pkgs.darwin.basic_cmds; }; xxd = { @@ -188,7 +188,7 @@ let # Provided for old usage of these commands. compat = with bins; lib.mapAttrs makeCompat { procps = [ ps sysctl top watch ]; - utillinux = [ fsck fdisk getopt hexdump mount + util-linux = [ fsck fdisk getopt hexdump mount script umount whereis write col column ]; nettools = [ arp hostname ifconfig netstat route ]; }; -- cgit 1.4.1 From 8929989614589ee3acd070a6409b2b9700c92d65 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 29 Nov 2020 00:01:14 +0000 Subject: lib: Clean up how linux and gcc config is specified The `platform` field is pointless nesting: it's just stuff that happens to be defined together, and that should be an implementation detail. This instead makes `linux-kernel` and `gcc` top level fields in platform configs. They join `rustc` there [all are optional], which was put there and not in `platform` in anticipation of a change like this. `linux-kernel.arch` in particular also becomes `linuxArch`, to match the other `*Arch`es. The next step after is this to combine the *specific* machines from `lib.systems.platforms` with `lib.systems.examples`, keeping just the "multiplatform" ones for defaulting. --- lib/systems/default.nix | 13 +- lib/systems/examples.nix | 48 +- lib/systems/platforms.nix | 670 +++++++++++---------- nixos/doc/manual/release-notes/rl-2103.xml | 16 + nixos/modules/hardware/device-tree.nix | 8 +- nixos/modules/installer/netboot/netboot.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 8 +- nixos/modules/system/activation/top-level.nix | 2 +- .../loader/generations-dir/generations-dir.nix | 2 +- .../system/boot/loader/raspberrypi/raspberrypi.nix | 2 +- nixos/release.nix | 4 +- pkgs/applications/audio/virtual-ans/default.nix | 2 +- .../applications/virtualization/crosvm/default.nix | 2 +- pkgs/applications/virtualization/vpcs/default.nix | 2 +- pkgs/build-support/bintools-wrapper/default.nix | 2 +- pkgs/build-support/cc-wrapper/default.nix | 16 +- pkgs/build-support/kernel/make-initrd.nix | 4 +- pkgs/build-support/vm/default.nix | 2 +- .../compilers/gcc/common/platform-flags.nix | 2 +- pkgs/development/compilers/julia/1.0.nix | 2 +- pkgs/development/compilers/julia/1.3.nix | 2 +- pkgs/development/compilers/julia/1.5.nix | 2 +- pkgs/development/libraries/glibc/common.nix | 2 +- .../libraries/qt-5/modules/qtwebengine.nix | 2 +- .../tools/poetry2nix/poetry2nix/pep425.nix | 6 +- .../tools/poetry2nix/poetry2nix/pep508.nix | 2 +- pkgs/development/web/nodejs/nodejs.nix | 11 +- pkgs/os-specific/linux/exfat/default.nix | 2 +- pkgs/os-specific/linux/kernel-headers/default.nix | 2 +- pkgs/os-specific/linux/kernel/generic.nix | 18 +- pkgs/os-specific/linux/kernel/manual-config.nix | 30 +- pkgs/os-specific/linux/klibc/default.nix | 4 +- pkgs/os-specific/linux/rtl8723bs/default.nix | 2 +- pkgs/os-specific/linux/rtl8812au/default.nix | 2 +- pkgs/os-specific/linux/uclibc/default.nix | 2 +- pkgs/stdenv/generic/make-derivation.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 37 files changed, 454 insertions(+), 448 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 4edcbeb36f1..84d0b34805a 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -24,8 +24,6 @@ rec { # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds. system = parse.doubleFromSystem final.parsed; config = parse.tripleFromSystem final.parsed; - # Just a guess, based on `system` - platform = platforms.select final; # Determine whether we are compatible with the provided CPU isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu; # Derived meta-data @@ -79,7 +77,16 @@ rec { }; isStatic = final.isWasm || final.isRedox; - kernelArch = + # Just a guess, based on `system` + inherit + ({ + linux-kernel = args.linux-kernel or {}; + gcc = args.gcc or {}; + rustc = args.rust or {}; + } // platforms.select final) + linux-kernel gcc rustc; + + linuxArch = if final.isAarch32 then "arm" else if final.isAarch64 then "arm64" else if final.isx86_32 then "x86" diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 16002450f2d..de12e0b83c1 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -7,7 +7,6 @@ let riscv = bits: { config = "riscv${bits}-unknown-linux-gnu"; - platform = platforms.riscv-multiplatform; }; in @@ -17,84 +16,68 @@ rec { # powernv = { config = "powerpc64le-unknown-linux-gnu"; - platform = platforms.powernv; }; musl-power = { config = "powerpc64le-unknown-linux-musl"; - platform = platforms.powernv; }; sheevaplug = { config = "armv5tel-unknown-linux-gnueabi"; - platform = platforms.sheevaplug; - }; + } // platforms.sheevaplug; raspberryPi = { config = "armv6l-unknown-linux-gnueabihf"; - platform = platforms.raspberrypi; - }; + } // platforms.raspberrypi; remarkable1 = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.zero-gravitas; - }; + } // platforms.zero-gravitas; remarkable2 = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.zero-sugar; - }; + } // platforms.zero-sugar; armv7l-hf-multiplatform = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.armv7l-hf-multiplatform; }; aarch64-multiplatform = { config = "aarch64-unknown-linux-gnu"; - platform = platforms.aarch64-multiplatform; }; armv7a-android-prebuilt = { config = "armv7a-unknown-linux-androideabi"; sdkVer = "29"; ndkVer = "21"; - platform = platforms.armv7a-android; useAndroidPrebuilt = true; - }; + } // platforms.armv7a-android; aarch64-android-prebuilt = { config = "aarch64-unknown-linux-android"; sdkVer = "29"; ndkVer = "21"; - platform = platforms.aarch64-multiplatform; useAndroidPrebuilt = true; }; - scaleway-c1 = armv7l-hf-multiplatform // rec { - platform = platforms.scaleway-c1; - inherit (platform.gcc) fpu; - }; + scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1; pogoplug4 = { config = "armv5tel-unknown-linux-gnueabi"; - platform = platforms.pogoplug4; - }; + } // platforms.pogoplug4; ben-nanonote = { config = "mipsel-unknown-linux-uclibc"; - platform = platforms.ben_nanonote; - }; + } // platforms.ben_nanonote; fuloongminipc = { config = "mipsel-unknown-linux-gnu"; - platform = platforms.fuloong2f_n32; - }; + } // platforms.fuloong2f_n32; muslpi = raspberryPi // { config = "armv6l-unknown-linux-musleabihf"; }; - aarch64-multiplatform-musl = aarch64-multiplatform // { + aarch64-multiplatform-musl = { config = "aarch64-unknown-linux-musl"; }; @@ -110,13 +93,11 @@ rec { riscv64-embedded = { config = "riscv64-none-elf"; libc = "newlib"; - platform = platforms.riscv-multiplatform; }; riscv32-embedded = { config = "riscv32-none-elf"; libc = "newlib"; - platform = platforms.riscv-multiplatform; }; mmix = { @@ -136,13 +117,11 @@ rec { vc4 = { config = "vc4-elf"; libc = "newlib"; - platform = {}; }; or1k = { config = "or1k-elf"; libc = "newlib"; - platform = {}; }; arm-embedded = { @@ -204,7 +183,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; - platform = {}; }; iphone32 = { @@ -214,7 +192,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; - platform = {}; }; iphone64-simulator = { @@ -224,7 +201,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; - platform = {}; }; iphone32-simulator = { @@ -234,7 +210,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; - platform = {}; }; # @@ -245,7 +220,6 @@ rec { mingw32 = { config = "i686-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - platform = {}; }; # 64 bit mingw-w64 @@ -253,7 +227,6 @@ rec { # That's the triplet they use in the mingw-w64 docs. config = "x86_64-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - platform = {}; }; # BSDs @@ -275,6 +248,5 @@ rec { # Ghcjs ghcjs = { config = "js-unknown-ghcjs"; - platform = {}; }; } diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index e869de488c1..f399c1873f5 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -1,39 +1,36 @@ { lib }: rec { - pcBase = { - name = "pc"; - kernelBaseConfig = "defconfig"; - # Build whatever possible as a module, if not stated in the extra config. - kernelAutoModules = true; - kernelTarget = "bzImage"; - }; - - pc64 = pcBase // { kernelArch = "x86_64"; }; - - pc32 = pcBase // { kernelArch = "i386"; }; - - pc32_simplekernel = pc32 // { - kernelAutoModules = false; + pc = { + linux-kernel = { + name = "pc"; + + baseConfig = "defconfig"; + # Build whatever possible as a module, if not stated in the extra config. + autoModules = true; + target = "bzImage"; + }; }; - pc64_simplekernel = pc64 // { - kernelAutoModules = false; + pc_simplekernel = lib.recursiveUpdate pc { + linux-kernel.autoModules = false; }; powernv = { - name = "PowerNV"; - kernelArch = "powerpc"; - kernelBaseConfig = "powernv_defconfig"; - kernelTarget = "zImage"; - kernelInstallTarget = "install"; - kernelFile = "vmlinux"; - kernelAutoModules = true; - # avoid driver/FS trouble arising from unusual page size - kernelExtraConfig = '' - PPC_64K_PAGES n - PPC_4K_PAGES y - IPV6 y - ''; + linux-kernel = { + name = "PowerNV"; + + baseConfig = "powernv_defconfig"; + target = "zImage"; + installTarget = "install"; + file = "vmlinux"; + autoModules = true; + # avoid driver/FS trouble arising from unusual page size + extraConfig = '' + PPC_64K_PAGES n + PPC_4K_PAGES y + IPV6 y + ''; + }; }; ## @@ -41,17 +38,121 @@ rec { ## pogoplug4 = { - name = "pogoplug4"; + linux-kernel = { + name = "pogoplug4"; + baseConfig = "multi_v5_defconfig"; + autoModules = false; + extraConfig = '' + # Ubi for the mtd + MTD_UBI y + UBIFS_FS y + UBIFS_FS_XATTR y + UBIFS_FS_ADVANCED_COMPR y + UBIFS_FS_LZO y + UBIFS_FS_ZLIB y + UBIFS_FS_DEBUG n + ''; + makeFlags = [ "LOADADDR=0x8000" ]; + target = "uImage"; + # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working + #DTB = true; + }; gcc = { arch = "armv5te"; }; + }; + + sheevaplug = { + linux-kernel = { + name = "sheevaplug"; + + baseConfig = "multi_v5_defconfig"; + autoModules = false; + extraConfig = '' + BLK_DEV_RAM y + BLK_DEV_INITRD y + BLK_DEV_CRYPTOLOOP m + BLK_DEV_DM m + DM_CRYPT m + MD y + REISERFS_FS m + BTRFS_FS m + XFS_FS m + JFS_FS m + EXT4_FS m + USB_STORAGE_CYPRESS_ATACB m + + # mv cesa requires this sw fallback, for mv-sha1 + CRYPTO_SHA1 y + # Fast crypto + CRYPTO_TWOFISH y + CRYPTO_TWOFISH_COMMON y + CRYPTO_BLOWFISH y + CRYPTO_BLOWFISH_COMMON y + + IP_PNP y + IP_PNP_DHCP y + NFS_FS y + ROOT_NFS y + TUN m + NFS_V4 y + NFS_V4_1 y + NFS_FSCACHE y + NFSD m + NFSD_V2_ACL y + NFSD_V3 y + NFSD_V3_ACL y + NFSD_V4 y + NETFILTER y + IP_NF_IPTABLES y + IP_NF_FILTER y + IP_NF_MATCH_ADDRTYPE y + IP_NF_TARGET_LOG y + IP_NF_MANGLE y + IPV6 m + VLAN_8021Q m + + CIFS y + CIFS_XATTR y + CIFS_POSIX y + CIFS_FSCACHE y + CIFS_ACL y + + WATCHDOG y + WATCHDOG_CORE y + ORION_WATCHDOG m + + ZRAM m + NETCONSOLE m + + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + + # Fail to build + DRM n + SCSI_ADVANSYS n + USB_ISP1362_HCD n + SND_SOC n + SND_ALI5451 n + FB_SAVAGE n + SCSI_NSP32 n + ATA_SFF n + SUNGEM n + IRDA n + ATM_HE n + SCSI_ACARD n + BLK_DEV_CMD640_ENHANCED n + + FUSE_FS m + + # systemd uses cgroups + CGROUPS y + + # Latencytop + LATENCYTOP y - kernelBaseConfig = "multi_v5_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelExtraConfig = - '' # Ubi for the mtd MTD_UBI y UBIFS_FS y @@ -60,137 +161,36 @@ rec { UBIFS_FS_LZO y UBIFS_FS_ZLIB y UBIFS_FS_DEBUG n - ''; - kernelMakeFlags = [ "LOADADDR=0x8000" ]; - kernelTarget = "uImage"; - # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working - #kernelDTB = true; - }; - sheevaplug = { - name = "sheevaplug"; - kernelBaseConfig = "multi_v5_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelExtraConfig = '' - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - BTRFS_FS m - XFS_FS m - JFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - # mv cesa requires this sw fallback, for mv-sha1 - CRYPTO_SHA1 y - # Fast crypto - CRYPTO_TWOFISH y - CRYPTO_TWOFISH_COMMON y - CRYPTO_BLOWFISH y - CRYPTO_BLOWFISH_COMMON y - - IP_PNP y - IP_PNP_DHCP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - NETFILTER y - IP_NF_IPTABLES y - IP_NF_FILTER y - IP_NF_MATCH_ADDRTYPE y - IP_NF_TARGET_LOG y - IP_NF_MANGLE y - IPV6 m - VLAN_8021Q m - - CIFS y - CIFS_XATTR y - CIFS_POSIX y - CIFS_FSCACHE y - CIFS_ACL y - - WATCHDOG y - WATCHDOG_CORE y - ORION_WATCHDOG m - - ZRAM m - NETCONSOLE m - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # systemd uses cgroups - CGROUPS y - - # Latencytop - LATENCYTOP y - - # Ubi for the mtd - MTD_UBI y - UBIFS_FS y - UBIFS_FS_XATTR y - UBIFS_FS_ADVANCED_COMPR y - UBIFS_FS_LZO y - UBIFS_FS_ZLIB y - UBIFS_FS_DEBUG n - - # Kdb, for kernel troubles - KGDB y - KGDB_SERIAL_CONSOLE y - KGDB_KDB y - ''; - kernelMakeFlags = [ "LOADADDR=0x0200000" ]; - kernelTarget = "uImage"; - kernelDTB = true; # Beyond 3.10 + # Kdb, for kernel troubles + KGDB y + KGDB_SERIAL_CONSOLE y + KGDB_KDB y + ''; + makeFlags = [ "LOADADDR=0x0200000" ]; + target = "uImage"; + DTB = true; # Beyond 3.10 + }; gcc = { arch = "armv5te"; }; }; raspberrypi = { - name = "raspberrypi"; - kernelBaseConfig = "bcm2835_defconfig"; - kernelDTB = true; - kernelArch = "arm"; - kernelAutoModules = true; - kernelPreferBuiltin = true; - kernelExtraConfig = '' - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; - kernelTarget = "zImage"; + linux-kernel = { + name = "raspberrypi"; + + baseConfig = "bcm2835_defconfig"; + DTB = true; + autoModules = true; + preferBuiltin = true; + extraConfig = '' + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + ''; + target = "zImage"; + }; gcc = { arch = "armv6"; fpu = "vfp"; @@ -201,13 +201,15 @@ rec { raspberrypi2 = armv7l-hf-multiplatform; zero-gravitas = { - name = "zero-gravitas"; - kernelBaseConfig = "zero-gravitas_defconfig"; - kernelArch = "arm"; - # kernelTarget verified by checking /boot on reMarkable 1 device - kernelTarget = "zImage"; - kernelAutoModules = false; - kernelDTB = true; + linux-kernel = { + name = "zero-gravitas"; + + baseConfig = "zero-gravitas_defconfig"; + # Target verified by checking /boot on reMarkable 1 device + target = "zImage"; + autoModules = false; + DTB = true; + }; gcc = { fpu = "neon"; cpu = "cortex-a9"; @@ -215,13 +217,15 @@ rec { }; zero-sugar = { - name = "zero-sugar"; - kernelBaseConfig = "zero-sugar_defconfig"; - kernelArch = "arm"; - kernelDTB = true; - kernelAutoModules = false; - kernelPreferBuiltin = true; - kernelTarget = "zImage"; + linux-kernel = { + name = "zero-sugar"; + + baseConfig = "zero-sugar_defconfig"; + DTB = true; + autoModules = false; + preferBuiltin = true; + target = "zImage"; + }; gcc = { cpu = "cortex-a7"; fpu = "neon-vfpv4"; @@ -229,7 +233,7 @@ rec { }; }; - scaleway-c1 = armv7l-hf-multiplatform // { + scaleway-c1 = lib.recursiveUpdate armv7l-hf-multiplatform { gcc = { cpu = "cortex-a9"; fpu = "vfpv3"; @@ -237,12 +241,11 @@ rec { }; utilite = { - name = "utilite"; - kernelBaseConfig = "multi_v7_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelExtraConfig = - '' + linux-kernel = { + name = "utilite"; + maseConfig = "multi_v7_defconfig"; + autoModules = false; + extraConfig = '' # Ubi for the mtd MTD_UBI y UBIFS_FS y @@ -252,35 +255,37 @@ rec { UBIFS_FS_ZLIB y UBIFS_FS_DEBUG n ''; - kernelMakeFlags = [ "LOADADDR=0x10800000" ]; - kernelTarget = "uImage"; - kernelDTB = true; + makeFlags = [ "LOADADDR=0x10800000" ]; + target = "uImage"; + DTB = true; + }; gcc = { cpu = "cortex-a9"; fpu = "neon"; }; }; - guruplug = sheevaplug // { + guruplug = lib.recursiveUpdate sheevaplug { # Define `CONFIG_MACH_GURUPLUG' (see # ) # and other GuruPlug-specific things. Requires the `guruplug-defconfig' # patch. - - kernelBaseConfig = "guruplug_defconfig"; + linux-kernel.baseConfig = "guruplug_defconfig"; }; - beaglebone = armv7l-hf-multiplatform // { - name = "beaglebone"; - kernelBaseConfig = "bb.org_defconfig"; - kernelAutoModules = false; - kernelExtraConfig = ""; # TBD kernel config - kernelTarget = "zImage"; + beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform { + linux-kernel = { + name = "beaglebone"; + baseConfig = "bb.org_defconfig"; + autoModules = false; + extraConfig = ""; # TBD kernel config + target = "zImage"; + }; }; # https://developer.android.com/ndk/guides/abis#v7a - armv7a-android = { - name = "armeabi-v7a"; + armv7a-android = { + linux-kernel.name = "armeabi-v7a"; gcc = { arch = "armv7-a"; float-abi = "softfp"; @@ -289,29 +294,31 @@ rec { }; armv7l-hf-multiplatform = { - name = "armv7l-hf-multiplatform"; - kernelBaseConfig = "multi_v7_defconfig"; - kernelArch = "arm"; - kernelDTB = true; - kernelAutoModules = true; - kernelPreferBuiltin = true; - kernelTarget = "zImage"; - kernelExtraConfig = '' - # Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig. - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Fix broken sunxi-sid nvmem driver. - TI_CPTS y - - # Hangs ODROID-XU4 - ARM_BIG_LITTLE_CPUIDLE n - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; + linux-kernel = { + name = "armv7l-hf-multiplatform"; + Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc. + baseConfig = "multi_v7_defconfig"; + DTB = true; + autoModules = true; + PreferBuiltin = true; + target = "zImage"; + extraConfig = '' + # Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig. + SERIAL_8250_BCM2835AUX y + SERIAL_8250_EXTENDED y + SERIAL_8250_SHARE_IRQ y + + # Fix broken sunxi-sid nvmem driver. + TI_CPTS y + + # Hangs ODROID-XU4 + ARM_BIG_LITTLE_CPUIDLE n + + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + ''; + }; gcc = { # Some table about fpu flags: # http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png @@ -336,34 +343,35 @@ rec { }; aarch64-multiplatform = { - name = "aarch64-multiplatform"; - kernelBaseConfig = "defconfig"; - kernelArch = "arm64"; - kernelDTB = true; - kernelAutoModules = true; - kernelPreferBuiltin = true; - kernelExtraConfig = '' - # Raspberry Pi 3 stuff. Not needed for kernels >= 4.10. - ARCH_BCM2835 y - BCM2835_MBOX y - BCM2835_WDT y - RASPBERRYPI_FIRMWARE y - RASPBERRYPI_POWER y - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Cavium ThunderX stuff. - PCI_HOST_THUNDER_ECAM y - - # Nvidia Tegra stuff. - PCI_TEGRA y - - # The default (=y) forces us to have the XHCI firmware available in initrd, - # which our initrd builder can't currently do easily. - USB_XHCI_TEGRA m - ''; - kernelTarget = "Image"; + linux-kernel = { + name = "aarch64-multiplatform"; + baseConfig = "defconfig"; + DTB = true; + autoModules = true; + preferBuiltin = true; + extraConfig = '' + # Raspberry Pi 3 stuff. Not needed for s >= 4.10. + ARCH_BCM2835 y + BCM2835_MBOX y + BCM2835_WDT y + RASPBERRYPI_FIRMWARE y + RASPBERRYPI_POWER y + SERIAL_8250_BCM2835AUX y + SERIAL_8250_EXTENDED y + SERIAL_8250_SHARE_IRQ y + + # Cavium ThunderX stuff. + PCI_HOST_THUNDER_ECAM y + + # Nvidia Tegra stuff. + PCI_TEGRA y + + # The default (=y) forces us to have the XHCI firmware available in initrd, + # which our initrd builder can't currently do easily. + USB_XHCI_TEGRA m + ''; + target = "Image"; + }; gcc = { arch = "armv8-a"; }; @@ -374,8 +382,9 @@ rec { ## ben_nanonote = { - name = "ben_nanonote"; - kernelArch = "mips"; + linux-kernel = { + name = "ben_nanonote"; + }; gcc = { arch = "mips32"; float = "soft"; @@ -383,75 +392,76 @@ rec { }; fuloong2f_n32 = { - name = "fuloong2f_n32"; - kernelBaseConfig = "lemote2f_defconfig"; - kernelArch = "mips"; - kernelAutoModules = false; - kernelExtraConfig = '' - MIGRATION n - COMPACTION n - - # nixos mounts some cgroup - CGROUPS y - - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - IP_PNP y - IP_PNP_DHCP y - IP_PNP_BOOTP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # Needed for udev >= 150 - SYSFS_DEPRECATED_V2 n - - VGA_CONSOLE n - VT_HW_CONSOLE_BINDING y - SERIAL_8250_CONSOLE y - FRAMEBUFFER_CONSOLE y - EXT2_FS y - EXT3_FS y - REISERFS_FS y - MAGIC_SYSRQ y - - # The kernel doesn't boot at all, with FTRACE - FTRACE n - ''; - kernelTarget = "vmlinux"; + linux-kernel = { + name = "fuloong2f_n32"; + baseConfig = "lemote2f_defconfig"; + autoModules = false; + extraConfig = '' + MIGRATION n + COMPACTION n + + # nixos mounts some cgroup + CGROUPS y + + BLK_DEV_RAM y + BLK_DEV_INITRD y + BLK_DEV_CRYPTOLOOP m + BLK_DEV_DM m + DM_CRYPT m + MD y + REISERFS_FS m + EXT4_FS m + USB_STORAGE_CYPRESS_ATACB m + + IP_PNP y + IP_PNP_DHCP y + IP_PNP_BOOTP y + NFS_FS y + ROOT_NFS y + TUN m + NFS_V4 y + NFS_V4_1 y + NFS_FSCACHE y + NFSD m + NFSD_V2_ACL y + NFSD_V3 y + NFSD_V3_ACL y + NFSD_V4 y + + # Fail to build + DRM n + SCSI_ADVANSYS n + USB_ISP1362_HCD n + SND_SOC n + SND_ALI5451 n + FB_SAVAGE n + SCSI_NSP32 n + ATA_SFF n + SUNGEM n + IRDA n + ATM_HE n + SCSI_ACARD n + BLK_DEV_CMD640_ENHANCED n + + FUSE_FS m + + # Needed for udev >= 150 + SYSFS_DEPRECATED_V2 n + + VGA_CONSOLE n + VT_HW_CONSOLE_BINDING y + SERIAL_8250_CONSOLE y + FRAMEBUFFER_CONSOLE y + EXT2_FS y + EXT3_FS y + REISERFS_FS y + MAGIC_SYSRQ y + + # The kernel doesn't boot at all, with FTRACE + FTRACE n + ''; + target = "vmlinux"; + }; gcc = { arch = "loongson2f"; float = "hard"; @@ -464,34 +474,36 @@ rec { ## riscv-multiplatform = { - name = "riscv-multiplatform"; - kernelArch = "riscv"; - kernelTarget = "vmlinux"; - kernelAutoModules = true; - kernelBaseConfig = "defconfig"; - kernelExtraConfig = '' - FTRACE n - SERIAL_OF_PLATFORM y - ''; + linux-kernel = { + name = "riscv-multiplatform"; + target = "vmlinux"; + autoModules = true; + baseConfig = "defconfig"; + extraConfig = '' + FTRACE n + SERIAL_OF_PLATFORM y + ''; + }; }; select = platform: # x86 - /**/ if platform.isx86_32 then pc32 - else if platform.isx86_64 then pc64 + /**/ if platform.isx86 then pc # ARM else if platform.isAarch32 then let version = platform.parsed.cpu.version or null; - in if version == null then pcBase + in if version == null then pc else if lib.versionOlder version "6" then sheevaplug else if lib.versionOlder version "7" then raspberrypi else armv7l-hf-multiplatform else if platform.isAarch64 then aarch64-multiplatform + else if platform.isRiscV then riscv-multiplatform + else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32 else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv - else pcBase; + else pc; } diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index e46d1ca403f..408c896defe 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -592,6 +592,22 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e /etc/netgroup defines network-wide groups and may affect to setups using NIS. + + + Platforms, like stdenv.hostPlatform, no longer have a platform attribute. + It has been (mostly) flattoned away: + + + platform.gcc is now gcc + platform.kernel* is now linux-kernel.* + + + Additionally, platform.kernelArch moved to the top level as linuxArch to match the other *Arch variables. + + + The platform grouping of these things never meant anything, and was just a historial/implementation artifact that was overdue removal. + + diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index e0ab37bca63..4aa1d6369d1 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -68,11 +68,11 @@ let patchShebangs scripts/* substituteInPlace scripts/Makefile.lib \ --replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@' - make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" - make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" + make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" + make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" ''; installPhase = '' - make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" + make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" ''; }; @@ -115,7 +115,7 @@ in options = { hardware.deviceTree = { enable = mkOption { - default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false; + default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false; type = types.bool; description = '' Build device tree files. These are used to describe the diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index 95eba86bcb6..fa074fdfcc6 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -88,7 +88,7 @@ with lib; system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" '' #!ipxe - kernel ${pkgs.stdenv.hostPlatform.platform.kernelTarget} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} + kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} initrd initrd boot ''; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 0eeff31d6c4..64bdbf159d5 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -587,10 +587,10 @@ in nix.systemFeatures = mkDefault ( [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ - optionals (pkgs.hostPlatform.platform ? gcc.arch) ( - # a builder can run code for `platform.gcc.arch` and inferior architectures - [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ - map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} + optionals (pkgs.hostPlatform ? gcc.arch) ( + # a builder can run code for `gcc.arch` and inferior architectures + [ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++ + map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.gcc.arch} ) ); diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 03d7e749323..b0f77ca3fb8 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -190,7 +190,7 @@ in system.boot.loader.kernelFile = mkOption { internal = true; - default = pkgs.stdenv.hostPlatform.platform.kernelTarget; + default = pkgs.stdenv.hostPlatform.linux-kernel.target; type = types.str; description = '' Name of the kernel file to be passed to the bootloader. diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix index 2d27611946e..fee567a510b 100644 --- a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix +++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix @@ -59,7 +59,7 @@ in system.build.installBootLoader = generationsDirBuilder; system.boot.loader.id = "generationsDir"; - system.boot.loader.kernelFile = platform.kernelTarget; + system.boot.loader.kernelFile = linux-kernel.target; }; } diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix index ba936b26573..db22dd36cbe 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix @@ -103,6 +103,6 @@ in system.build.installBootLoader = builder; system.boot.loader.id = "raspberrypi"; - system.boot.loader.kernelFile = platform.kernelTarget; + system.boot.loader.kernelFile = linux-kernel.target; }; } diff --git a/nixos/release.nix b/nixos/release.nix index 1f5c1581269..109747945f7 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -79,7 +79,7 @@ let in tarball // { meta = { - description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.platform.name}"; + description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.linux-kernel.name}"; maintainers = map (x: lib.maintainers.${x}) maintainers; }; inherit config; @@ -105,7 +105,7 @@ let modules = makeModules module {}; }; build = configEvaled.config.system.build; - kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; + kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.linux-kernel.target; in pkgs.symlinkJoin { name = "netboot"; diff --git a/pkgs/applications/audio/virtual-ans/default.nix b/pkgs/applications/audio/virtual-ans/default.nix index dd7e8b062da..1cb9c0f18bf 100644 --- a/pkgs/applications/audio/virtual-ans/default.nix +++ b/pkgs/applications/audio/virtual-ans/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { startScript = if stdenv.isx86_32 then "START_LINUX_X86" else if stdenv.isx86_64 then "START_LINUX_X86_64" #else if stdenv.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin - else abort "Unsupported platform: ${stdenv.platform.kernelArch}."; + else abort "Unsupported platform: ${stdenv.hostPlatform.linuxArch}."; linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86" else if stdenv.isx86_64 then "pixilang_linux_x86_64" diff --git a/pkgs/applications/virtualization/crosvm/default.nix b/pkgs/applications/virtualization/crosvm/default.nix index 3ad540e5307..848b93a5381 100644 --- a/pkgs/applications/virtualization/crosvm/default.nix +++ b/pkgs/applications/virtualization/crosvm/default.nix @@ -75,7 +75,7 @@ in CROSVM_CARGO_TEST_KERNEL_BINARY = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) - "${linux}/${stdenv.hostPlatform.platform.kernelTarget}"; + "${linux}/${stdenv.hostPlatform.linux-kernel.target}"; passthru = { inherit adhdSrc; diff --git a/pkgs/applications/virtualization/vpcs/default.nix b/pkgs/applications/virtualization/vpcs/default.nix index 33d707a5007..8c41a1f4c27 100644 --- a/pkgs/applications/virtualization/vpcs/default.nix +++ b/pkgs/applications/virtualization/vpcs/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildPhase = ''( cd src - ./mk.sh ${stdenv.buildPlatform.platform.kernelArch} + ./mk.sh ${stdenv.buildPlatform.linuxArch} )''; installPhase = '' diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index bd3ebdf800e..e0d43739668 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -190,7 +190,7 @@ stdenv.mkDerivation { else if targetPlatform.isRiscV then "lriscv" else throw "unknown emulation for platform: ${targetPlatform.config}"; in if targetPlatform.useLLVM or false then "" - else targetPlatform.platform.bfdEmulation or (fmt + sep + arch); + else targetPlatform.bfdEmulation or (fmt + sep + arch); strictDeps = true; depsTargetTargetPropagated = extraPackages; diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index d1d5f8e6c86..faa62cb5b12 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -403,31 +403,31 @@ stdenv.mkDerivation { # discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in # that case. + optionalString ((targetPlatform ? platform.gcc.arch) && - isGccArchSupported targetPlatform.platform.gcc.arch) '' - echo "-march=${targetPlatform.platform.gcc.arch}" >> $out/nix-support/cc-cflags-before + isGccArchSupported targetPlatform.gcc.arch) '' + echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before '' # -mcpu is not very useful. You should use mtune and march # instead. It’s provided here for backwards compatibility. + optionalString (targetPlatform ? platform.gcc.cpu) '' - echo "-mcpu=${targetPlatform.platform.gcc.cpu}" >> $out/nix-support/cc-cflags-before + echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before '' # -mfloat-abi only matters on arm32 but we set it here # unconditionally just in case. If the abi specifically sets hard # vs. soft floats we use it here. + optionalString (targetPlatform ? platform.gcc.float-abi) '' - echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before + echo "-mfloat-abi=${targetPlatform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.fpu) '' - echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before + echo "-mfpu=${targetPlatform.gcc.fpu}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.mode) '' - echo "-mmode=${targetPlatform.platform.gcc.mode}" >> $out/nix-support/cc-cflags-before + echo "-mmode=${targetPlatform.gcc.mode}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.tune && - isGccArchSupported targetPlatform.platform.gcc.tune) '' - echo "-mtune=${targetPlatform.platform.gcc.tune}" >> $out/nix-support/cc-cflags-before + isGccArchSupported targetPlatform.gcc.tune) '' + echo "-mtune=${targetPlatform.gcc.tune}" >> $out/nix-support/cc-cflags-before '' # TODO: categorize these and figure out a better place for them diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 901eb311a88..9af40d33242 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -56,13 +56,13 @@ in , prepend ? [] # Whether to wrap the initramfs in a u-boot image. -, makeUInitrd ? stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage" +, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target == "uImage" # If generating a u-boot image, the architecture to use. The default # guess may not align with u-boot's nomenclature correctly, so it can # be overridden. # See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list. -, uInitrdArch ? stdenvNoCC.hostPlatform.kernelArch +, uInitrdArch ? stdenvNoCC.hostPlatform.linuxArch # The name of the compression, as recognised by u-boot. # See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list. diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 5f3c7e1d621..215782368f6 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -1,6 +1,6 @@ { pkgs , kernel ? pkgs.linux -, img ? pkgs.stdenv.hostPlatform.platform.kernelTarget +, img ? pkgs.stdenv.hostPlatform.linux-kernel.target , storeDir ? builtins.storeDir , rootModules ? [ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ] diff --git a/pkgs/development/compilers/gcc/common/platform-flags.nix b/pkgs/development/compilers/gcc/common/platform-flags.nix index f3cdce41193..66af8c4a4cc 100644 --- a/pkgs/development/compilers/gcc/common/platform-flags.nix +++ b/pkgs/development/compilers/gcc/common/platform-flags.nix @@ -1,7 +1,7 @@ { lib, targetPlatform }: let - p = targetPlatform.platform.gcc or {} + p = targetPlatform.gcc or {} // targetPlatform.parsed.abi; in lib.concatLists [ (lib.optional (!targetPlatform.isx86_64 && p ? arch) "--with-arch=${p.arch}") # --with-arch= is unknown flag on x86_64 diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index 0325632ad0a..78f7c2ef1b9 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -123,7 +123,7 @@ stdenv.mkDerivation rec { let arch = stdenv.lib.head (stdenv.lib.splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/compilers/julia/1.3.nix b/pkgs/development/compilers/julia/1.3.nix index 8096af0b320..2a270b7c72c 100644 --- a/pkgs/development/compilers/julia/1.3.nix +++ b/pkgs/development/compilers/julia/1.3.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { let arch = head (splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/compilers/julia/1.5.nix b/pkgs/development/compilers/julia/1.5.nix index be3cfc39635..778a9c3a9d7 100644 --- a/pkgs/development/compilers/julia/1.5.nix +++ b/pkgs/development/compilers/julia/1.5.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { let arch = head (splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 6b17e463d76..6637a9bb2a3 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -158,7 +158,7 @@ stdenv.mkDerivation ({ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ (lib.flip lib.withFeature "fp" - (stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) + (stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) "--with-__thread" ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index e6ab23073b1..1a3f1948f84 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -88,7 +88,7 @@ qtModule { NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit "-Wno-class-memaccess" - ] ++ lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ + ] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [ # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940 # TODO: investigate and fix properly "-march=westmere" diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix index e333bd49718..edf556377b3 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix @@ -73,9 +73,9 @@ let if isLinux then ( - x: x.platform == "manylinux1_${stdenv.platform.kernelArch}" - || x.platform == "manylinux2010_${stdenv.platform.kernelArch}" - || x.platform == "manylinux2014_${stdenv.platform.kernelArch}" + x: x.platform == "manylinux1_${stdenv.hostPlatform.linuxArch}" + || x.platform == "manylinux2010_${stdenv.hostPlatform.linuxArch}" + || x.platform == "manylinux2014_${stdenv.hostPlatform.linuxArch}" || x.platform == "any" ) else (x: hasInfix "macosx" x.platform || x.platform == "any"); diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix index ba8145398f5..ea2f27b0e22 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix @@ -95,7 +95,7 @@ let else if stdenv.isDarwin then "darwin" else throw "Unsupported platform" ); - platform_machine = stdenv.platform.kernelArch; + platform_machine = stdenv.hostPlatform.linuxArch; platform_python_implementation = let impl = python.passthru.implementation; diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 5308149c26b..ccea8ee4553 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -60,18 +60,17 @@ in configureFlags = let isCross = stdenv.hostPlatform != stdenv.buildPlatform; - host = stdenv.hostPlatform.platform; - isAarch32 = stdenv.hostPlatform.isAarch32; + inherit (stdenv.hostPlatform) gcc isArch32; in sharedConfigureFlags ++ [ "--without-dtrace" ] ++ (optionals isCross [ "--cross-compiling" "--without-intl" "--without-snapshot" - ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" host.gcc) [ - "--with-arm-fpu=${host.gcc.fpu}" - ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" host.gcc) [ - "--with-arm-float-abi=${host.gcc.float-abi}" + ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" gcc) [ + "--with-arm-fpu=${gcc.fpu}" + ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" gcc) [ + "--with-arm-float-abi=${gcc.float-abi}" ]) ++ (optionals (isCross && isAarch32) [ "--dest-cpu=arm" ]) ++ extraConfigFlags; diff --git a/pkgs/os-specific/linux/exfat/default.nix b/pkgs/os-specific/linux/exfat/default.nix index 88792346d70..958bcdb9f16 100644 --- a/pkgs/os-specific/linux/exfat/default.nix +++ b/pkgs/os-specific/linux/exfat/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" + "ARCH=${stdenv.hostPlatform.linuxArch}" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index cadf65a7220..d6ed7bccba3 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -7,7 +7,7 @@ let pname = "linux-headers"; inherit version; - ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or stdenvNoCC.hostPlatform.kernelArch; + ARCH = stdenvNoCC.hostPlatform.linuxArch; # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler. diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 31a90dc740f..ac9d6fbb2b5 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -42,7 +42,7 @@ # symbolic name and `patch' is the actual patch. The patch may # optionally be compressed with gzip or bzip2. kernelPatches ? [] -, ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" || +, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc" || stdenv.hostPlatform != stdenv.buildPlatform , extraMeta ? {} @@ -51,10 +51,10 @@ , isLibre ? false , isHardened ? false -# easy overrides to stdenv.hostPlatform.platform members -, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules -, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false -, kernelArch ? stdenv.hostPlatform.platform.kernelArch +# easy overrides to stdenv.hostPlatform.linux-kernel members +, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules +, preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false +, kernelArch ? stdenv.hostPlatform.linuxArch , ... }: @@ -87,7 +87,7 @@ let intermediateNixConfig = configfile.moduleStructuredConfig.intermediateNixConfig # extra config in legacy string format + extraConfig - + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig; + + stdenv.hostPlatform.linux-kernel.extraConfig or ""; structuredConfigFromPatches = map ({extraStructuredConfig ? {}, ...}: {settings=extraStructuredConfig;}) kernelPatches; @@ -113,11 +113,11 @@ let nativeBuildInputs = [ perl gmp libmpc mpfr ] ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ]; - platformName = stdenv.hostPlatform.platform.name; + platformName = stdenv.hostPlatform.linux-kernel.name; # e.g. "defconfig" - kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig; + kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig; # e.g. "bzImage" - kernelTarget = stdenv.hostPlatform.platform.kernelTarget; + kernelTarget = stdenv.hostPlatform.linux-kernel.target; prePatch = kernel.prePatch + '' # Patch kconfig to print "###" after every question so that diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 67016b71918..2fc63322f5b 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -64,10 +64,10 @@ let commonMakeFlags = [ "O=$(buildRoot)" - ] ++ lib.optionals (stdenv.hostPlatform.platform ? kernelMakeFlags) - stdenv.hostPlatform.platform.kernelMakeFlags; + ] ++ lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) + stdenv.hostPlatform.linux-kernel.makeFlags; - drvAttrs = config_: platform: kernelPatches: configfile: + drvAttrs = config_: kernelConf: kernelPatches: configfile: let config = let attrName = attr: "CONFIG_" + attr; in { isSet = attr: hasAttr (attrName attr) config; @@ -171,7 +171,7 @@ let buildFlags = [ "KBUILD_BUILD_VERSION=1-NixOS" - platform.kernelTarget + kernelConf.target "vmlinux" # for "perf" and things like that ] ++ optional isModular "modules"; @@ -186,16 +186,16 @@ let ''; # Some image types need special install targets (e.g. uImage is installed with make uinstall) - installTargets = [ ( - if platform ? kernelInstallTarget then platform.kernelInstallTarget - else if platform.kernelTarget == "uImage" then "uinstall" - else if platform.kernelTarget == "zImage" || platform.kernelTarget == "Image.gz" then "zinstall" - else "install" - ) ]; + installTargets = [ + (kernelConf.installTarget or ( + /**/ if kernelConf.target == "uImage" then "uinstall" + else if kernelConf.target == "zImage" || kernelConf.target == "Image.gz" then "zinstall" + else "install")) + ]; postInstall = (optionalString installsFirmware '' mkdir -p $out/lib/firmware - '') + (if (platform ? kernelDTB && platform.kernelDTB) then '' + '') + (if (kernelConf.DTB or false) then '' make $makeFlags "''${makeFlagsArray[@]}" dtbs dtbs_install INSTALL_DTBS_PATH=$out/dtbs '' else "") + (if isModular then '' mkdir -p $dev @@ -300,7 +300,7 @@ in assert (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") -> libelf != null; assert lib.versionAtLeast version "5.8" -> elfutils != null; -stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { +stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPatches configfile) // { pname = "linux"; inherit version; @@ -308,7 +308,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd ] - ++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools + ++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools ++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf # Removed util-linuxMinimal since it should not be a dependency. ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] @@ -322,10 +322,10 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches makeFlags = commonMakeFlags ++ [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" + "ARCH=${stdenv.hostPlatform.linuxArch}" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; - karch = stdenv.hostPlatform.platform.kernelArch; + karch = stdenv.hostPlatform.linuxArch; }) diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 65ab71bd562..dc96f3b6a62 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" "stackprotector" ]; makeFlags = commonMakeFlags ++ [ - "KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}" + "KLIBCARCH=${stdenv.hostPlatform.linuxArch}" "KLIBCKERNELSRC=${linuxHeaders}" ] # TODO(@Ericson2314): We now can get the ABI from # `stdenv.hostPlatform.parsed.abi`, is this still a good idea? - ++ lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" + ++ lib.optional (stdenv.hostPlatform.linuxArch == "arm") "CONFIG_AEABI=y" ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; # Install static binaries as well. diff --git a/pkgs/os-specific/linux/rtl8723bs/default.nix b/pkgs/os-specific/linux/rtl8723bs/default.nix index 056fd40d252..a862b351716 100644 --- a/pkgs/os-specific/linux/rtl8723bs/default.nix +++ b/pkgs/os-specific/linux/rtl8723bs/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ nukeReferences ]; makeFlags = [ - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" # Normally not needed, but the Makefile sets ARCH in a broken way. + "ARCH=${stdenv.hostPlatform.linuxArch}" # Normally not needed, but the Makefile sets ARCH in a broken way. "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" # Makefile uses $(uname -r); breaks us. ]; diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index aeed87d3c19..68a88fb6778 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ''; makeFlags = [ - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" + "ARCH=${stdenv.hostPlatform.linuxArch}" "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix index 7c95a98372d..7508e1faf15 100644 --- a/pkgs/os-specific/linux/uclibc/default.nix +++ b/pkgs/os-specific/linux/uclibc/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation { cat << EOF | parseconfig ${nixConfig} ${extraConfig} - ${stdenv.hostPlatform.platform.uclibc.extraConfig or ""} + ${stdenv.hostPlatform.uclibc.extraConfig or ""} EOF ( set +o pipefail; yes "" | make oldconfig ) ''; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 0eb799e4525..e8ccd02c041 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -279,7 +279,7 @@ in rec { } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) { NIX_HARDENING_ENABLE = enabledHardeningOptions; } // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? platform.gcc.arch) { - requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.platform.gcc.arch}" ]; + requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ]; } // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) { inherit __darwinAllowLocalNetworking; # TODO: remove lib.unique once nix has a list canonicalization primitive diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5985483c4ed..5db97df7b29 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19284,7 +19284,7 @@ in buildPhase = '' set -x make \ - ARCH=${stdenv.hostPlatform.kernelArch} \ + ARCH=${stdenv.hostPlatform.linuxArch} \ HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \ ${makeTarget} ''; -- cgit 1.4.1 From 0bc275e63423456d6deb650e146120c39c1e0723 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 22 Jan 2021 14:07:06 -0800 Subject: Revert "lib: Clean up how linux and gcc config is specified" This is a stdenv-rebuild, and should not be merged into master This reverts commit 8929989614589ee3acd070a6409b2b9700c92d65. --- lib/systems/default.nix | 13 +- lib/systems/examples.nix | 48 +- lib/systems/platforms.nix | 670 ++++++++++----------- nixos/doc/manual/release-notes/rl-2103.xml | 16 - nixos/modules/hardware/device-tree.nix | 8 +- nixos/modules/installer/netboot/netboot.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 8 +- nixos/modules/system/activation/top-level.nix | 2 +- .../loader/generations-dir/generations-dir.nix | 2 +- .../system/boot/loader/raspberrypi/raspberrypi.nix | 2 +- nixos/release.nix | 4 +- pkgs/applications/audio/virtual-ans/default.nix | 2 +- .../applications/virtualization/crosvm/default.nix | 2 +- pkgs/applications/virtualization/vpcs/default.nix | 2 +- pkgs/build-support/bintools-wrapper/default.nix | 2 +- pkgs/build-support/cc-wrapper/default.nix | 16 +- pkgs/build-support/kernel/make-initrd.nix | 4 +- pkgs/build-support/vm/default.nix | 2 +- .../compilers/gcc/common/platform-flags.nix | 2 +- pkgs/development/compilers/julia/1.0.nix | 2 +- pkgs/development/compilers/julia/1.3.nix | 2 +- pkgs/development/compilers/julia/1.5.nix | 2 +- pkgs/development/libraries/glibc/common.nix | 2 +- .../libraries/qt-5/modules/qtwebengine.nix | 2 +- .../tools/poetry2nix/poetry2nix/pep425.nix | 6 +- .../tools/poetry2nix/poetry2nix/pep508.nix | 2 +- pkgs/development/web/nodejs/nodejs.nix | 11 +- pkgs/os-specific/linux/exfat/default.nix | 2 +- pkgs/os-specific/linux/kernel-headers/default.nix | 2 +- pkgs/os-specific/linux/kernel/generic.nix | 18 +- pkgs/os-specific/linux/kernel/manual-config.nix | 30 +- pkgs/os-specific/linux/klibc/default.nix | 4 +- pkgs/os-specific/linux/rtl8723bs/default.nix | 2 +- pkgs/os-specific/linux/rtl8812au/default.nix | 2 +- pkgs/os-specific/linux/uclibc/default.nix | 2 +- pkgs/stdenv/generic/make-derivation.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 37 files changed, 448 insertions(+), 454 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 84d0b34805a..4edcbeb36f1 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -24,6 +24,8 @@ rec { # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds. system = parse.doubleFromSystem final.parsed; config = parse.tripleFromSystem final.parsed; + # Just a guess, based on `system` + platform = platforms.select final; # Determine whether we are compatible with the provided CPU isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu; # Derived meta-data @@ -77,16 +79,7 @@ rec { }; isStatic = final.isWasm || final.isRedox; - # Just a guess, based on `system` - inherit - ({ - linux-kernel = args.linux-kernel or {}; - gcc = args.gcc or {}; - rustc = args.rust or {}; - } // platforms.select final) - linux-kernel gcc rustc; - - linuxArch = + kernelArch = if final.isAarch32 then "arm" else if final.isAarch64 then "arm64" else if final.isx86_32 then "x86" diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index de12e0b83c1..16002450f2d 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -7,6 +7,7 @@ let riscv = bits: { config = "riscv${bits}-unknown-linux-gnu"; + platform = platforms.riscv-multiplatform; }; in @@ -16,68 +17,84 @@ rec { # powernv = { config = "powerpc64le-unknown-linux-gnu"; + platform = platforms.powernv; }; musl-power = { config = "powerpc64le-unknown-linux-musl"; + platform = platforms.powernv; }; sheevaplug = { config = "armv5tel-unknown-linux-gnueabi"; - } // platforms.sheevaplug; + platform = platforms.sheevaplug; + }; raspberryPi = { config = "armv6l-unknown-linux-gnueabihf"; - } // platforms.raspberrypi; + platform = platforms.raspberrypi; + }; remarkable1 = { config = "armv7l-unknown-linux-gnueabihf"; - } // platforms.zero-gravitas; + platform = platforms.zero-gravitas; + }; remarkable2 = { config = "armv7l-unknown-linux-gnueabihf"; - } // platforms.zero-sugar; + platform = platforms.zero-sugar; + }; armv7l-hf-multiplatform = { config = "armv7l-unknown-linux-gnueabihf"; + platform = platforms.armv7l-hf-multiplatform; }; aarch64-multiplatform = { config = "aarch64-unknown-linux-gnu"; + platform = platforms.aarch64-multiplatform; }; armv7a-android-prebuilt = { config = "armv7a-unknown-linux-androideabi"; sdkVer = "29"; ndkVer = "21"; + platform = platforms.armv7a-android; useAndroidPrebuilt = true; - } // platforms.armv7a-android; + }; aarch64-android-prebuilt = { config = "aarch64-unknown-linux-android"; sdkVer = "29"; ndkVer = "21"; + platform = platforms.aarch64-multiplatform; useAndroidPrebuilt = true; }; - scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1; + scaleway-c1 = armv7l-hf-multiplatform // rec { + platform = platforms.scaleway-c1; + inherit (platform.gcc) fpu; + }; pogoplug4 = { config = "armv5tel-unknown-linux-gnueabi"; - } // platforms.pogoplug4; + platform = platforms.pogoplug4; + }; ben-nanonote = { config = "mipsel-unknown-linux-uclibc"; - } // platforms.ben_nanonote; + platform = platforms.ben_nanonote; + }; fuloongminipc = { config = "mipsel-unknown-linux-gnu"; - } // platforms.fuloong2f_n32; + platform = platforms.fuloong2f_n32; + }; muslpi = raspberryPi // { config = "armv6l-unknown-linux-musleabihf"; }; - aarch64-multiplatform-musl = { + aarch64-multiplatform-musl = aarch64-multiplatform // { config = "aarch64-unknown-linux-musl"; }; @@ -93,11 +110,13 @@ rec { riscv64-embedded = { config = "riscv64-none-elf"; libc = "newlib"; + platform = platforms.riscv-multiplatform; }; riscv32-embedded = { config = "riscv32-none-elf"; libc = "newlib"; + platform = platforms.riscv-multiplatform; }; mmix = { @@ -117,11 +136,13 @@ rec { vc4 = { config = "vc4-elf"; libc = "newlib"; + platform = {}; }; or1k = { config = "or1k-elf"; libc = "newlib"; + platform = {}; }; arm-embedded = { @@ -183,6 +204,7 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; + platform = {}; }; iphone32 = { @@ -192,6 +214,7 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; + platform = {}; }; iphone64-simulator = { @@ -201,6 +224,7 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; + platform = {}; }; iphone32-simulator = { @@ -210,6 +234,7 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; + platform = {}; }; # @@ -220,6 +245,7 @@ rec { mingw32 = { config = "i686-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain + platform = {}; }; # 64 bit mingw-w64 @@ -227,6 +253,7 @@ rec { # That's the triplet they use in the mingw-w64 docs. config = "x86_64-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain + platform = {}; }; # BSDs @@ -248,5 +275,6 @@ rec { # Ghcjs ghcjs = { config = "js-unknown-ghcjs"; + platform = {}; }; } diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index f399c1873f5..e869de488c1 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -1,36 +1,39 @@ { lib }: rec { - pc = { - linux-kernel = { - name = "pc"; - - baseConfig = "defconfig"; - # Build whatever possible as a module, if not stated in the extra config. - autoModules = true; - target = "bzImage"; - }; + pcBase = { + name = "pc"; + kernelBaseConfig = "defconfig"; + # Build whatever possible as a module, if not stated in the extra config. + kernelAutoModules = true; + kernelTarget = "bzImage"; + }; + + pc64 = pcBase // { kernelArch = "x86_64"; }; + + pc32 = pcBase // { kernelArch = "i386"; }; + + pc32_simplekernel = pc32 // { + kernelAutoModules = false; }; - pc_simplekernel = lib.recursiveUpdate pc { - linux-kernel.autoModules = false; + pc64_simplekernel = pc64 // { + kernelAutoModules = false; }; powernv = { - linux-kernel = { - name = "PowerNV"; - - baseConfig = "powernv_defconfig"; - target = "zImage"; - installTarget = "install"; - file = "vmlinux"; - autoModules = true; - # avoid driver/FS trouble arising from unusual page size - extraConfig = '' - PPC_64K_PAGES n - PPC_4K_PAGES y - IPV6 y - ''; - }; + name = "PowerNV"; + kernelArch = "powerpc"; + kernelBaseConfig = "powernv_defconfig"; + kernelTarget = "zImage"; + kernelInstallTarget = "install"; + kernelFile = "vmlinux"; + kernelAutoModules = true; + # avoid driver/FS trouble arising from unusual page size + kernelExtraConfig = '' + PPC_64K_PAGES n + PPC_4K_PAGES y + IPV6 y + ''; }; ## @@ -38,121 +41,17 @@ rec { ## pogoplug4 = { - linux-kernel = { - name = "pogoplug4"; + name = "pogoplug4"; - baseConfig = "multi_v5_defconfig"; - autoModules = false; - extraConfig = '' - # Ubi for the mtd - MTD_UBI y - UBIFS_FS y - UBIFS_FS_XATTR y - UBIFS_FS_ADVANCED_COMPR y - UBIFS_FS_LZO y - UBIFS_FS_ZLIB y - UBIFS_FS_DEBUG n - ''; - makeFlags = [ "LOADADDR=0x8000" ]; - target = "uImage"; - # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working - #DTB = true; - }; gcc = { arch = "armv5te"; }; - }; - - sheevaplug = { - linux-kernel = { - name = "sheevaplug"; - - baseConfig = "multi_v5_defconfig"; - autoModules = false; - extraConfig = '' - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - BTRFS_FS m - XFS_FS m - JFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - # mv cesa requires this sw fallback, for mv-sha1 - CRYPTO_SHA1 y - # Fast crypto - CRYPTO_TWOFISH y - CRYPTO_TWOFISH_COMMON y - CRYPTO_BLOWFISH y - CRYPTO_BLOWFISH_COMMON y - - IP_PNP y - IP_PNP_DHCP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - NETFILTER y - IP_NF_IPTABLES y - IP_NF_FILTER y - IP_NF_MATCH_ADDRTYPE y - IP_NF_TARGET_LOG y - IP_NF_MANGLE y - IPV6 m - VLAN_8021Q m - - CIFS y - CIFS_XATTR y - CIFS_POSIX y - CIFS_FSCACHE y - CIFS_ACL y - - WATCHDOG y - WATCHDOG_CORE y - ORION_WATCHDOG m - - ZRAM m - NETCONSOLE m - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # systemd uses cgroups - CGROUPS y - - # Latencytop - LATENCYTOP y + kernelBaseConfig = "multi_v5_defconfig"; + kernelArch = "arm"; + kernelAutoModules = false; + kernelExtraConfig = + '' # Ubi for the mtd MTD_UBI y UBIFS_FS y @@ -161,36 +60,137 @@ rec { UBIFS_FS_LZO y UBIFS_FS_ZLIB y UBIFS_FS_DEBUG n - - # Kdb, for kernel troubles - KGDB y - KGDB_SERIAL_CONSOLE y - KGDB_KDB y ''; - makeFlags = [ "LOADADDR=0x0200000" ]; - target = "uImage"; - DTB = true; # Beyond 3.10 - }; + kernelMakeFlags = [ "LOADADDR=0x8000" ]; + kernelTarget = "uImage"; + # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working + #kernelDTB = true; + }; + + sheevaplug = { + name = "sheevaplug"; + kernelBaseConfig = "multi_v5_defconfig"; + kernelArch = "arm"; + kernelAutoModules = false; + kernelExtraConfig = '' + BLK_DEV_RAM y + BLK_DEV_INITRD y + BLK_DEV_CRYPTOLOOP m + BLK_DEV_DM m + DM_CRYPT m + MD y + REISERFS_FS m + BTRFS_FS m + XFS_FS m + JFS_FS m + EXT4_FS m + USB_STORAGE_CYPRESS_ATACB m + + # mv cesa requires this sw fallback, for mv-sha1 + CRYPTO_SHA1 y + # Fast crypto + CRYPTO_TWOFISH y + CRYPTO_TWOFISH_COMMON y + CRYPTO_BLOWFISH y + CRYPTO_BLOWFISH_COMMON y + + IP_PNP y + IP_PNP_DHCP y + NFS_FS y + ROOT_NFS y + TUN m + NFS_V4 y + NFS_V4_1 y + NFS_FSCACHE y + NFSD m + NFSD_V2_ACL y + NFSD_V3 y + NFSD_V3_ACL y + NFSD_V4 y + NETFILTER y + IP_NF_IPTABLES y + IP_NF_FILTER y + IP_NF_MATCH_ADDRTYPE y + IP_NF_TARGET_LOG y + IP_NF_MANGLE y + IPV6 m + VLAN_8021Q m + + CIFS y + CIFS_XATTR y + CIFS_POSIX y + CIFS_FSCACHE y + CIFS_ACL y + + WATCHDOG y + WATCHDOG_CORE y + ORION_WATCHDOG m + + ZRAM m + NETCONSOLE m + + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + + # Fail to build + DRM n + SCSI_ADVANSYS n + USB_ISP1362_HCD n + SND_SOC n + SND_ALI5451 n + FB_SAVAGE n + SCSI_NSP32 n + ATA_SFF n + SUNGEM n + IRDA n + ATM_HE n + SCSI_ACARD n + BLK_DEV_CMD640_ENHANCED n + + FUSE_FS m + + # systemd uses cgroups + CGROUPS y + + # Latencytop + LATENCYTOP y + + # Ubi for the mtd + MTD_UBI y + UBIFS_FS y + UBIFS_FS_XATTR y + UBIFS_FS_ADVANCED_COMPR y + UBIFS_FS_LZO y + UBIFS_FS_ZLIB y + UBIFS_FS_DEBUG n + + # Kdb, for kernel troubles + KGDB y + KGDB_SERIAL_CONSOLE y + KGDB_KDB y + ''; + kernelMakeFlags = [ "LOADADDR=0x0200000" ]; + kernelTarget = "uImage"; + kernelDTB = true; # Beyond 3.10 gcc = { arch = "armv5te"; }; }; raspberrypi = { - linux-kernel = { - name = "raspberrypi"; - - baseConfig = "bcm2835_defconfig"; - DTB = true; - autoModules = true; - preferBuiltin = true; - extraConfig = '' - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; - target = "zImage"; - }; + name = "raspberrypi"; + kernelBaseConfig = "bcm2835_defconfig"; + kernelDTB = true; + kernelArch = "arm"; + kernelAutoModules = true; + kernelPreferBuiltin = true; + kernelExtraConfig = '' + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + ''; + kernelTarget = "zImage"; gcc = { arch = "armv6"; fpu = "vfp"; @@ -201,15 +201,13 @@ rec { raspberrypi2 = armv7l-hf-multiplatform; zero-gravitas = { - linux-kernel = { - name = "zero-gravitas"; - - baseConfig = "zero-gravitas_defconfig"; - # Target verified by checking /boot on reMarkable 1 device - target = "zImage"; - autoModules = false; - DTB = true; - }; + name = "zero-gravitas"; + kernelBaseConfig = "zero-gravitas_defconfig"; + kernelArch = "arm"; + # kernelTarget verified by checking /boot on reMarkable 1 device + kernelTarget = "zImage"; + kernelAutoModules = false; + kernelDTB = true; gcc = { fpu = "neon"; cpu = "cortex-a9"; @@ -217,15 +215,13 @@ rec { }; zero-sugar = { - linux-kernel = { - name = "zero-sugar"; - - baseConfig = "zero-sugar_defconfig"; - DTB = true; - autoModules = false; - preferBuiltin = true; - target = "zImage"; - }; + name = "zero-sugar"; + kernelBaseConfig = "zero-sugar_defconfig"; + kernelArch = "arm"; + kernelDTB = true; + kernelAutoModules = false; + kernelPreferBuiltin = true; + kernelTarget = "zImage"; gcc = { cpu = "cortex-a7"; fpu = "neon-vfpv4"; @@ -233,7 +229,7 @@ rec { }; }; - scaleway-c1 = lib.recursiveUpdate armv7l-hf-multiplatform { + scaleway-c1 = armv7l-hf-multiplatform // { gcc = { cpu = "cortex-a9"; fpu = "vfpv3"; @@ -241,11 +237,12 @@ rec { }; utilite = { - linux-kernel = { - name = "utilite"; - maseConfig = "multi_v7_defconfig"; - autoModules = false; - extraConfig = '' + name = "utilite"; + kernelBaseConfig = "multi_v7_defconfig"; + kernelArch = "arm"; + kernelAutoModules = false; + kernelExtraConfig = + '' # Ubi for the mtd MTD_UBI y UBIFS_FS y @@ -255,37 +252,35 @@ rec { UBIFS_FS_ZLIB y UBIFS_FS_DEBUG n ''; - makeFlags = [ "LOADADDR=0x10800000" ]; - target = "uImage"; - DTB = true; - }; + kernelMakeFlags = [ "LOADADDR=0x10800000" ]; + kernelTarget = "uImage"; + kernelDTB = true; gcc = { cpu = "cortex-a9"; fpu = "neon"; }; }; - guruplug = lib.recursiveUpdate sheevaplug { + guruplug = sheevaplug // { # Define `CONFIG_MACH_GURUPLUG' (see # ) # and other GuruPlug-specific things. Requires the `guruplug-defconfig' # patch. - linux-kernel.baseConfig = "guruplug_defconfig"; + + kernelBaseConfig = "guruplug_defconfig"; }; - beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform { - linux-kernel = { - name = "beaglebone"; - baseConfig = "bb.org_defconfig"; - autoModules = false; - extraConfig = ""; # TBD kernel config - target = "zImage"; - }; + beaglebone = armv7l-hf-multiplatform // { + name = "beaglebone"; + kernelBaseConfig = "bb.org_defconfig"; + kernelAutoModules = false; + kernelExtraConfig = ""; # TBD kernel config + kernelTarget = "zImage"; }; # https://developer.android.com/ndk/guides/abis#v7a - armv7a-android = { - linux-kernel.name = "armeabi-v7a"; + armv7a-android = { + name = "armeabi-v7a"; gcc = { arch = "armv7-a"; float-abi = "softfp"; @@ -294,31 +289,29 @@ rec { }; armv7l-hf-multiplatform = { - linux-kernel = { - name = "armv7l-hf-multiplatform"; - Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc. - baseConfig = "multi_v7_defconfig"; - DTB = true; - autoModules = true; - PreferBuiltin = true; - target = "zImage"; - extraConfig = '' - # Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig. - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Fix broken sunxi-sid nvmem driver. - TI_CPTS y - - # Hangs ODROID-XU4 - ARM_BIG_LITTLE_CPUIDLE n - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; - }; + name = "armv7l-hf-multiplatform"; + kernelBaseConfig = "multi_v7_defconfig"; + kernelArch = "arm"; + kernelDTB = true; + kernelAutoModules = true; + kernelPreferBuiltin = true; + kernelTarget = "zImage"; + kernelExtraConfig = '' + # Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig. + SERIAL_8250_BCM2835AUX y + SERIAL_8250_EXTENDED y + SERIAL_8250_SHARE_IRQ y + + # Fix broken sunxi-sid nvmem driver. + TI_CPTS y + + # Hangs ODROID-XU4 + ARM_BIG_LITTLE_CPUIDLE n + + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + ''; gcc = { # Some table about fpu flags: # http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png @@ -343,35 +336,34 @@ rec { }; aarch64-multiplatform = { - linux-kernel = { - name = "aarch64-multiplatform"; - baseConfig = "defconfig"; - DTB = true; - autoModules = true; - preferBuiltin = true; - extraConfig = '' - # Raspberry Pi 3 stuff. Not needed for s >= 4.10. - ARCH_BCM2835 y - BCM2835_MBOX y - BCM2835_WDT y - RASPBERRYPI_FIRMWARE y - RASPBERRYPI_POWER y - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Cavium ThunderX stuff. - PCI_HOST_THUNDER_ECAM y - - # Nvidia Tegra stuff. - PCI_TEGRA y - - # The default (=y) forces us to have the XHCI firmware available in initrd, - # which our initrd builder can't currently do easily. - USB_XHCI_TEGRA m - ''; - target = "Image"; - }; + name = "aarch64-multiplatform"; + kernelBaseConfig = "defconfig"; + kernelArch = "arm64"; + kernelDTB = true; + kernelAutoModules = true; + kernelPreferBuiltin = true; + kernelExtraConfig = '' + # Raspberry Pi 3 stuff. Not needed for kernels >= 4.10. + ARCH_BCM2835 y + BCM2835_MBOX y + BCM2835_WDT y + RASPBERRYPI_FIRMWARE y + RASPBERRYPI_POWER y + SERIAL_8250_BCM2835AUX y + SERIAL_8250_EXTENDED y + SERIAL_8250_SHARE_IRQ y + + # Cavium ThunderX stuff. + PCI_HOST_THUNDER_ECAM y + + # Nvidia Tegra stuff. + PCI_TEGRA y + + # The default (=y) forces us to have the XHCI firmware available in initrd, + # which our initrd builder can't currently do easily. + USB_XHCI_TEGRA m + ''; + kernelTarget = "Image"; gcc = { arch = "armv8-a"; }; @@ -382,9 +374,8 @@ rec { ## ben_nanonote = { - linux-kernel = { - name = "ben_nanonote"; - }; + name = "ben_nanonote"; + kernelArch = "mips"; gcc = { arch = "mips32"; float = "soft"; @@ -392,76 +383,75 @@ rec { }; fuloong2f_n32 = { - linux-kernel = { - name = "fuloong2f_n32"; - baseConfig = "lemote2f_defconfig"; - autoModules = false; - extraConfig = '' - MIGRATION n - COMPACTION n - - # nixos mounts some cgroup - CGROUPS y - - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - IP_PNP y - IP_PNP_DHCP y - IP_PNP_BOOTP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # Needed for udev >= 150 - SYSFS_DEPRECATED_V2 n - - VGA_CONSOLE n - VT_HW_CONSOLE_BINDING y - SERIAL_8250_CONSOLE y - FRAMEBUFFER_CONSOLE y - EXT2_FS y - EXT3_FS y - REISERFS_FS y - MAGIC_SYSRQ y - - # The kernel doesn't boot at all, with FTRACE - FTRACE n - ''; - target = "vmlinux"; - }; + name = "fuloong2f_n32"; + kernelBaseConfig = "lemote2f_defconfig"; + kernelArch = "mips"; + kernelAutoModules = false; + kernelExtraConfig = '' + MIGRATION n + COMPACTION n + + # nixos mounts some cgroup + CGROUPS y + + BLK_DEV_RAM y + BLK_DEV_INITRD y + BLK_DEV_CRYPTOLOOP m + BLK_DEV_DM m + DM_CRYPT m + MD y + REISERFS_FS m + EXT4_FS m + USB_STORAGE_CYPRESS_ATACB m + + IP_PNP y + IP_PNP_DHCP y + IP_PNP_BOOTP y + NFS_FS y + ROOT_NFS y + TUN m + NFS_V4 y + NFS_V4_1 y + NFS_FSCACHE y + NFSD m + NFSD_V2_ACL y + NFSD_V3 y + NFSD_V3_ACL y + NFSD_V4 y + + # Fail to build + DRM n + SCSI_ADVANSYS n + USB_ISP1362_HCD n + SND_SOC n + SND_ALI5451 n + FB_SAVAGE n + SCSI_NSP32 n + ATA_SFF n + SUNGEM n + IRDA n + ATM_HE n + SCSI_ACARD n + BLK_DEV_CMD640_ENHANCED n + + FUSE_FS m + + # Needed for udev >= 150 + SYSFS_DEPRECATED_V2 n + + VGA_CONSOLE n + VT_HW_CONSOLE_BINDING y + SERIAL_8250_CONSOLE y + FRAMEBUFFER_CONSOLE y + EXT2_FS y + EXT3_FS y + REISERFS_FS y + MAGIC_SYSRQ y + + # The kernel doesn't boot at all, with FTRACE + FTRACE n + ''; + kernelTarget = "vmlinux"; gcc = { arch = "loongson2f"; float = "hard"; @@ -474,36 +464,34 @@ rec { ## riscv-multiplatform = { - linux-kernel = { - name = "riscv-multiplatform"; - target = "vmlinux"; - autoModules = true; - baseConfig = "defconfig"; - extraConfig = '' - FTRACE n - SERIAL_OF_PLATFORM y - ''; - }; + name = "riscv-multiplatform"; + kernelArch = "riscv"; + kernelTarget = "vmlinux"; + kernelAutoModules = true; + kernelBaseConfig = "defconfig"; + kernelExtraConfig = '' + FTRACE n + SERIAL_OF_PLATFORM y + ''; }; select = platform: # x86 - /**/ if platform.isx86 then pc + /**/ if platform.isx86_32 then pc32 + else if platform.isx86_64 then pc64 # ARM else if platform.isAarch32 then let version = platform.parsed.cpu.version or null; - in if version == null then pc + in if version == null then pcBase else if lib.versionOlder version "6" then sheevaplug else if lib.versionOlder version "7" then raspberrypi else armv7l-hf-multiplatform else if platform.isAarch64 then aarch64-multiplatform - else if platform.isRiscV then riscv-multiplatform - else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32 else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv - else pc; + else pcBase; } diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index c706cd30fce..94e42369b60 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -603,22 +603,6 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e /etc/netgroup defines network-wide groups and may affect to setups using NIS. - - - Platforms, like stdenv.hostPlatform, no longer have a platform attribute. - It has been (mostly) flattoned away: - - - platform.gcc is now gcc - platform.kernel* is now linux-kernel.* - - - Additionally, platform.kernelArch moved to the top level as linuxArch to match the other *Arch variables. - - - The platform grouping of these things never meant anything, and was just a historial/implementation artifact that was overdue removal. - - diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index 4aa1d6369d1..e0ab37bca63 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -68,11 +68,11 @@ let patchShebangs scripts/* substituteInPlace scripts/Makefile.lib \ --replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@' - make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" - make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" + make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" + make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" ''; installPhase = '' - make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" + make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" ''; }; @@ -115,7 +115,7 @@ in options = { hardware.deviceTree = { enable = mkOption { - default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false; + default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false; type = types.bool; description = '' Build device tree files. These are used to describe the diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index fa074fdfcc6..95eba86bcb6 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -88,7 +88,7 @@ with lib; system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" '' #!ipxe - kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} + kernel ${pkgs.stdenv.hostPlatform.platform.kernelTarget} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} initrd initrd boot ''; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 64bdbf159d5..0eeff31d6c4 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -587,10 +587,10 @@ in nix.systemFeatures = mkDefault ( [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ - optionals (pkgs.hostPlatform ? gcc.arch) ( - # a builder can run code for `gcc.arch` and inferior architectures - [ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++ - map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.gcc.arch} + optionals (pkgs.hostPlatform.platform ? gcc.arch) ( + # a builder can run code for `platform.gcc.arch` and inferior architectures + [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ + map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} ) ); diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index b0f77ca3fb8..03d7e749323 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -190,7 +190,7 @@ in system.boot.loader.kernelFile = mkOption { internal = true; - default = pkgs.stdenv.hostPlatform.linux-kernel.target; + default = pkgs.stdenv.hostPlatform.platform.kernelTarget; type = types.str; description = '' Name of the kernel file to be passed to the bootloader. diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix index fee567a510b..2d27611946e 100644 --- a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix +++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix @@ -59,7 +59,7 @@ in system.build.installBootLoader = generationsDirBuilder; system.boot.loader.id = "generationsDir"; - system.boot.loader.kernelFile = linux-kernel.target; + system.boot.loader.kernelFile = platform.kernelTarget; }; } diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix index db22dd36cbe..ba936b26573 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix @@ -103,6 +103,6 @@ in system.build.installBootLoader = builder; system.boot.loader.id = "raspberrypi"; - system.boot.loader.kernelFile = linux-kernel.target; + system.boot.loader.kernelFile = platform.kernelTarget; }; } diff --git a/nixos/release.nix b/nixos/release.nix index 109747945f7..1f5c1581269 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -79,7 +79,7 @@ let in tarball // { meta = { - description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.linux-kernel.name}"; + description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.platform.name}"; maintainers = map (x: lib.maintainers.${x}) maintainers; }; inherit config; @@ -105,7 +105,7 @@ let modules = makeModules module {}; }; build = configEvaled.config.system.build; - kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.linux-kernel.target; + kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; in pkgs.symlinkJoin { name = "netboot"; diff --git a/pkgs/applications/audio/virtual-ans/default.nix b/pkgs/applications/audio/virtual-ans/default.nix index 1cb9c0f18bf..dd7e8b062da 100644 --- a/pkgs/applications/audio/virtual-ans/default.nix +++ b/pkgs/applications/audio/virtual-ans/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { startScript = if stdenv.isx86_32 then "START_LINUX_X86" else if stdenv.isx86_64 then "START_LINUX_X86_64" #else if stdenv.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin - else abort "Unsupported platform: ${stdenv.hostPlatform.linuxArch}."; + else abort "Unsupported platform: ${stdenv.platform.kernelArch}."; linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86" else if stdenv.isx86_64 then "pixilang_linux_x86_64" diff --git a/pkgs/applications/virtualization/crosvm/default.nix b/pkgs/applications/virtualization/crosvm/default.nix index 848b93a5381..3ad540e5307 100644 --- a/pkgs/applications/virtualization/crosvm/default.nix +++ b/pkgs/applications/virtualization/crosvm/default.nix @@ -75,7 +75,7 @@ in CROSVM_CARGO_TEST_KERNEL_BINARY = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) - "${linux}/${stdenv.hostPlatform.linux-kernel.target}"; + "${linux}/${stdenv.hostPlatform.platform.kernelTarget}"; passthru = { inherit adhdSrc; diff --git a/pkgs/applications/virtualization/vpcs/default.nix b/pkgs/applications/virtualization/vpcs/default.nix index 8c41a1f4c27..33d707a5007 100644 --- a/pkgs/applications/virtualization/vpcs/default.nix +++ b/pkgs/applications/virtualization/vpcs/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildPhase = ''( cd src - ./mk.sh ${stdenv.buildPlatform.linuxArch} + ./mk.sh ${stdenv.buildPlatform.platform.kernelArch} )''; installPhase = '' diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index e0d43739668..bd3ebdf800e 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -190,7 +190,7 @@ stdenv.mkDerivation { else if targetPlatform.isRiscV then "lriscv" else throw "unknown emulation for platform: ${targetPlatform.config}"; in if targetPlatform.useLLVM or false then "" - else targetPlatform.bfdEmulation or (fmt + sep + arch); + else targetPlatform.platform.bfdEmulation or (fmt + sep + arch); strictDeps = true; depsTargetTargetPropagated = extraPackages; diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index faa62cb5b12..d1d5f8e6c86 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -403,31 +403,31 @@ stdenv.mkDerivation { # discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in # that case. + optionalString ((targetPlatform ? platform.gcc.arch) && - isGccArchSupported targetPlatform.gcc.arch) '' - echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before + isGccArchSupported targetPlatform.platform.gcc.arch) '' + echo "-march=${targetPlatform.platform.gcc.arch}" >> $out/nix-support/cc-cflags-before '' # -mcpu is not very useful. You should use mtune and march # instead. It’s provided here for backwards compatibility. + optionalString (targetPlatform ? platform.gcc.cpu) '' - echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before + echo "-mcpu=${targetPlatform.platform.gcc.cpu}" >> $out/nix-support/cc-cflags-before '' # -mfloat-abi only matters on arm32 but we set it here # unconditionally just in case. If the abi specifically sets hard # vs. soft floats we use it here. + optionalString (targetPlatform ? platform.gcc.float-abi) '' - echo "-mfloat-abi=${targetPlatform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before + echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.fpu) '' - echo "-mfpu=${targetPlatform.gcc.fpu}" >> $out/nix-support/cc-cflags-before + echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.mode) '' - echo "-mmode=${targetPlatform.gcc.mode}" >> $out/nix-support/cc-cflags-before + echo "-mmode=${targetPlatform.platform.gcc.mode}" >> $out/nix-support/cc-cflags-before '' + optionalString (targetPlatform ? platform.gcc.tune && - isGccArchSupported targetPlatform.gcc.tune) '' - echo "-mtune=${targetPlatform.gcc.tune}" >> $out/nix-support/cc-cflags-before + isGccArchSupported targetPlatform.platform.gcc.tune) '' + echo "-mtune=${targetPlatform.platform.gcc.tune}" >> $out/nix-support/cc-cflags-before '' # TODO: categorize these and figure out a better place for them diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 9af40d33242..901eb311a88 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -56,13 +56,13 @@ in , prepend ? [] # Whether to wrap the initramfs in a u-boot image. -, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target == "uImage" +, makeUInitrd ? stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage" # If generating a u-boot image, the architecture to use. The default # guess may not align with u-boot's nomenclature correctly, so it can # be overridden. # See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list. -, uInitrdArch ? stdenvNoCC.hostPlatform.linuxArch +, uInitrdArch ? stdenvNoCC.hostPlatform.kernelArch # The name of the compression, as recognised by u-boot. # See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list. diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 215782368f6..5f3c7e1d621 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -1,6 +1,6 @@ { pkgs , kernel ? pkgs.linux -, img ? pkgs.stdenv.hostPlatform.linux-kernel.target +, img ? pkgs.stdenv.hostPlatform.platform.kernelTarget , storeDir ? builtins.storeDir , rootModules ? [ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ] diff --git a/pkgs/development/compilers/gcc/common/platform-flags.nix b/pkgs/development/compilers/gcc/common/platform-flags.nix index 66af8c4a4cc..f3cdce41193 100644 --- a/pkgs/development/compilers/gcc/common/platform-flags.nix +++ b/pkgs/development/compilers/gcc/common/platform-flags.nix @@ -1,7 +1,7 @@ { lib, targetPlatform }: let - p = targetPlatform.gcc or {} + p = targetPlatform.platform.gcc or {} // targetPlatform.parsed.abi; in lib.concatLists [ (lib.optional (!targetPlatform.isx86_64 && p ? arch) "--with-arch=${p.arch}") # --with-arch= is unknown flag on x86_64 diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index 78f7c2ef1b9..0325632ad0a 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -123,7 +123,7 @@ stdenv.mkDerivation rec { let arch = stdenv.lib.head (stdenv.lib.splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/compilers/julia/1.3.nix b/pkgs/development/compilers/julia/1.3.nix index 2a270b7c72c..8096af0b320 100644 --- a/pkgs/development/compilers/julia/1.3.nix +++ b/pkgs/development/compilers/julia/1.3.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { let arch = head (splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/compilers/julia/1.5.nix b/pkgs/development/compilers/julia/1.5.nix index 778a9c3a9d7..be3cfc39635 100644 --- a/pkgs/development/compilers/julia/1.5.nix +++ b/pkgs/development/compilers/julia/1.5.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { let arch = head (splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 6637a9bb2a3..6b17e463d76 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -158,7 +158,7 @@ stdenv.mkDerivation ({ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ (lib.flip lib.withFeature "fp" - (stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) + (stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) "--with-__thread" ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 1a3f1948f84..e6ab23073b1 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -88,7 +88,7 @@ qtModule { NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit "-Wno-class-memaccess" - ] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [ + ] ++ lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940 # TODO: investigate and fix properly "-march=westmere" diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix index edf556377b3..e333bd49718 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix @@ -73,9 +73,9 @@ let if isLinux then ( - x: x.platform == "manylinux1_${stdenv.hostPlatform.linuxArch}" - || x.platform == "manylinux2010_${stdenv.hostPlatform.linuxArch}" - || x.platform == "manylinux2014_${stdenv.hostPlatform.linuxArch}" + x: x.platform == "manylinux1_${stdenv.platform.kernelArch}" + || x.platform == "manylinux2010_${stdenv.platform.kernelArch}" + || x.platform == "manylinux2014_${stdenv.platform.kernelArch}" || x.platform == "any" ) else (x: hasInfix "macosx" x.platform || x.platform == "any"); diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix index ea2f27b0e22..ba8145398f5 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix @@ -95,7 +95,7 @@ let else if stdenv.isDarwin then "darwin" else throw "Unsupported platform" ); - platform_machine = stdenv.hostPlatform.linuxArch; + platform_machine = stdenv.platform.kernelArch; platform_python_implementation = let impl = python.passthru.implementation; diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index ccea8ee4553..5308149c26b 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -60,17 +60,18 @@ in configureFlags = let isCross = stdenv.hostPlatform != stdenv.buildPlatform; - inherit (stdenv.hostPlatform) gcc isArch32; + host = stdenv.hostPlatform.platform; + isAarch32 = stdenv.hostPlatform.isAarch32; in sharedConfigureFlags ++ [ "--without-dtrace" ] ++ (optionals isCross [ "--cross-compiling" "--without-intl" "--without-snapshot" - ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" gcc) [ - "--with-arm-fpu=${gcc.fpu}" - ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" gcc) [ - "--with-arm-float-abi=${gcc.float-abi}" + ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" host.gcc) [ + "--with-arm-fpu=${host.gcc.fpu}" + ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" host.gcc) [ + "--with-arm-float-abi=${host.gcc.float-abi}" ]) ++ (optionals (isCross && isAarch32) [ "--dest-cpu=arm" ]) ++ extraConfigFlags; diff --git a/pkgs/os-specific/linux/exfat/default.nix b/pkgs/os-specific/linux/exfat/default.nix index 958bcdb9f16..88792346d70 100644 --- a/pkgs/os-specific/linux/exfat/default.nix +++ b/pkgs/os-specific/linux/exfat/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - "ARCH=${stdenv.hostPlatform.linuxArch}" + "ARCH=${stdenv.hostPlatform.platform.kernelArch}" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index d6ed7bccba3..cadf65a7220 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -7,7 +7,7 @@ let pname = "linux-headers"; inherit version; - ARCH = stdenvNoCC.hostPlatform.linuxArch; + ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or stdenvNoCC.hostPlatform.kernelArch; # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler. diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index ac9d6fbb2b5..31a90dc740f 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -42,7 +42,7 @@ # symbolic name and `patch' is the actual patch. The patch may # optionally be compressed with gzip or bzip2. kernelPatches ? [] -, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc" || +, ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" || stdenv.hostPlatform != stdenv.buildPlatform , extraMeta ? {} @@ -51,10 +51,10 @@ , isLibre ? false , isHardened ? false -# easy overrides to stdenv.hostPlatform.linux-kernel members -, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules -, preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false -, kernelArch ? stdenv.hostPlatform.linuxArch +# easy overrides to stdenv.hostPlatform.platform members +, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules +, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false +, kernelArch ? stdenv.hostPlatform.platform.kernelArch , ... }: @@ -87,7 +87,7 @@ let intermediateNixConfig = configfile.moduleStructuredConfig.intermediateNixConfig # extra config in legacy string format + extraConfig - + stdenv.hostPlatform.linux-kernel.extraConfig or ""; + + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig; structuredConfigFromPatches = map ({extraStructuredConfig ? {}, ...}: {settings=extraStructuredConfig;}) kernelPatches; @@ -113,11 +113,11 @@ let nativeBuildInputs = [ perl gmp libmpc mpfr ] ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ]; - platformName = stdenv.hostPlatform.linux-kernel.name; + platformName = stdenv.hostPlatform.platform.name; # e.g. "defconfig" - kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig; + kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig; # e.g. "bzImage" - kernelTarget = stdenv.hostPlatform.linux-kernel.target; + kernelTarget = stdenv.hostPlatform.platform.kernelTarget; prePatch = kernel.prePatch + '' # Patch kconfig to print "###" after every question so that diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 2fc63322f5b..67016b71918 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -64,10 +64,10 @@ let commonMakeFlags = [ "O=$(buildRoot)" - ] ++ lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) - stdenv.hostPlatform.linux-kernel.makeFlags; + ] ++ lib.optionals (stdenv.hostPlatform.platform ? kernelMakeFlags) + stdenv.hostPlatform.platform.kernelMakeFlags; - drvAttrs = config_: kernelConf: kernelPatches: configfile: + drvAttrs = config_: platform: kernelPatches: configfile: let config = let attrName = attr: "CONFIG_" + attr; in { isSet = attr: hasAttr (attrName attr) config; @@ -171,7 +171,7 @@ let buildFlags = [ "KBUILD_BUILD_VERSION=1-NixOS" - kernelConf.target + platform.kernelTarget "vmlinux" # for "perf" and things like that ] ++ optional isModular "modules"; @@ -186,16 +186,16 @@ let ''; # Some image types need special install targets (e.g. uImage is installed with make uinstall) - installTargets = [ - (kernelConf.installTarget or ( - /**/ if kernelConf.target == "uImage" then "uinstall" - else if kernelConf.target == "zImage" || kernelConf.target == "Image.gz" then "zinstall" - else "install")) - ]; + installTargets = [ ( + if platform ? kernelInstallTarget then platform.kernelInstallTarget + else if platform.kernelTarget == "uImage" then "uinstall" + else if platform.kernelTarget == "zImage" || platform.kernelTarget == "Image.gz" then "zinstall" + else "install" + ) ]; postInstall = (optionalString installsFirmware '' mkdir -p $out/lib/firmware - '') + (if (kernelConf.DTB or false) then '' + '') + (if (platform ? kernelDTB && platform.kernelDTB) then '' make $makeFlags "''${makeFlagsArray[@]}" dtbs dtbs_install INSTALL_DTBS_PATH=$out/dtbs '' else "") + (if isModular then '' mkdir -p $dev @@ -300,7 +300,7 @@ in assert (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") -> libelf != null; assert lib.versionAtLeast version "5.8" -> elfutils != null; -stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPatches configfile) // { +stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { pname = "linux"; inherit version; @@ -308,7 +308,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd ] - ++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools + ++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools ++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf # Removed util-linuxMinimal since it should not be a dependency. ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] @@ -322,10 +322,10 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat makeFlags = commonMakeFlags ++ [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" - "ARCH=${stdenv.hostPlatform.linuxArch}" + "ARCH=${stdenv.hostPlatform.platform.kernelArch}" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; - karch = stdenv.hostPlatform.linuxArch; + karch = stdenv.hostPlatform.platform.kernelArch; }) diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index dc96f3b6a62..65ab71bd562 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" "stackprotector" ]; makeFlags = commonMakeFlags ++ [ - "KLIBCARCH=${stdenv.hostPlatform.linuxArch}" + "KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}" "KLIBCKERNELSRC=${linuxHeaders}" ] # TODO(@Ericson2314): We now can get the ABI from # `stdenv.hostPlatform.parsed.abi`, is this still a good idea? - ++ lib.optional (stdenv.hostPlatform.linuxArch == "arm") "CONFIG_AEABI=y" + ++ lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; # Install static binaries as well. diff --git a/pkgs/os-specific/linux/rtl8723bs/default.nix b/pkgs/os-specific/linux/rtl8723bs/default.nix index a862b351716..056fd40d252 100644 --- a/pkgs/os-specific/linux/rtl8723bs/default.nix +++ b/pkgs/os-specific/linux/rtl8723bs/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ nukeReferences ]; makeFlags = [ - "ARCH=${stdenv.hostPlatform.linuxArch}" # Normally not needed, but the Makefile sets ARCH in a broken way. + "ARCH=${stdenv.hostPlatform.platform.kernelArch}" # Normally not needed, but the Makefile sets ARCH in a broken way. "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" # Makefile uses $(uname -r); breaks us. ]; diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index 68a88fb6778..aeed87d3c19 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ''; makeFlags = [ - "ARCH=${stdenv.hostPlatform.linuxArch}" + "ARCH=${stdenv.hostPlatform.platform.kernelArch}" "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix index 7508e1faf15..7c95a98372d 100644 --- a/pkgs/os-specific/linux/uclibc/default.nix +++ b/pkgs/os-specific/linux/uclibc/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation { cat << EOF | parseconfig ${nixConfig} ${extraConfig} - ${stdenv.hostPlatform.uclibc.extraConfig or ""} + ${stdenv.hostPlatform.platform.uclibc.extraConfig or ""} EOF ( set +o pipefail; yes "" | make oldconfig ) ''; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index e8ccd02c041..0eb799e4525 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -279,7 +279,7 @@ in rec { } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) { NIX_HARDENING_ENABLE = enabledHardeningOptions; } // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? platform.gcc.arch) { - requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ]; + requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.platform.gcc.arch}" ]; } // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) { inherit __darwinAllowLocalNetworking; # TODO: remove lib.unique once nix has a list canonicalization primitive diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed9f3047969..bd86fed4cb2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19291,7 +19291,7 @@ in buildPhase = '' set -x make \ - ARCH=${stdenv.hostPlatform.linuxArch} \ + ARCH=${stdenv.hostPlatform.kernelArch} \ HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \ ${makeTarget} ''; -- cgit 1.4.1 From 9c213398b312e0f0bb9cdf05090fd20223a82ad0 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 22 Jan 2021 20:33:55 -0500 Subject: lib: Clean up how linux and gcc config is specified Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that commit for details. This reverts commit 0bc275e63423456d6deb650e146120c39c1e0723. --- lib/systems/architectures.nix | 2 +- lib/systems/default.nix | 19 +- lib/systems/examples.nix | 48 +- lib/systems/platforms.nix | 670 +++++++++++---------- nixos/doc/manual/release-notes/rl-2103.xml | 16 + nixos/modules/hardware/device-tree.nix | 8 +- nixos/modules/installer/netboot/netboot.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 8 +- nixos/modules/system/activation/top-level.nix | 2 +- .../loader/generations-dir/generations-dir.nix | 2 +- .../system/boot/loader/raspberrypi/raspberrypi.nix | 2 +- nixos/release.nix | 4 +- pkgs/applications/audio/virtual-ans/default.nix | 2 +- .../applications/virtualization/crosvm/default.nix | 2 +- pkgs/applications/virtualization/vpcs/default.nix | 2 +- pkgs/build-support/bintools-wrapper/default.nix | 2 +- pkgs/build-support/cc-wrapper/default.nix | 28 +- pkgs/build-support/kernel/make-initrd.nix | 4 +- pkgs/build-support/vm/default.nix | 2 +- .../compilers/gcc/common/platform-flags.nix | 2 +- pkgs/development/compilers/julia/1.0.nix | 2 +- pkgs/development/compilers/julia/1.3.nix | 2 +- pkgs/development/compilers/julia/1.5.nix | 2 +- pkgs/development/libraries/glibc/common.nix | 2 +- .../libraries/qt-5/modules/qtwebengine.nix | 2 +- .../tools/poetry2nix/poetry2nix/pep425.nix | 6 +- .../tools/poetry2nix/poetry2nix/pep508.nix | 2 +- pkgs/development/web/nodejs/nodejs.nix | 11 +- pkgs/os-specific/linux/exfat/default.nix | 2 +- pkgs/os-specific/linux/kernel-headers/default.nix | 2 +- pkgs/os-specific/linux/kernel/generic.nix | 18 +- pkgs/os-specific/linux/kernel/manual-config.nix | 30 +- pkgs/os-specific/linux/klibc/default.nix | 4 +- pkgs/os-specific/linux/rtl8723bs/default.nix | 2 +- pkgs/os-specific/linux/rtl8812au/default.nix | 2 +- pkgs/os-specific/linux/uclibc/default.nix | 2 +- pkgs/stdenv/generic/make-derivation.nix | 4 +- pkgs/top-level/all-packages.nix | 2 +- 38 files changed, 465 insertions(+), 459 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/lib/systems/architectures.nix b/lib/systems/architectures.nix index 8e3a56b0d7c..ddc320d24e0 100644 --- a/lib/systems/architectures.nix +++ b/lib/systems/architectures.nix @@ -1,7 +1,7 @@ { lib }: rec { - # platform.gcc.arch to its features (as in /proc/cpuinfo) + # gcc.arch to its features (as in /proc/cpuinfo) features = { default = [ ]; # x86_64 Intel diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 4edcbeb36f1..1a89120e2bf 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -24,8 +24,6 @@ rec { # Either of these can be losslessly-extracted from `parsed` iff parsing succeeds. system = parse.doubleFromSystem final.parsed; config = parse.tripleFromSystem final.parsed; - # Just a guess, based on `system` - platform = platforms.select final; # Determine whether we are compatible with the provided CPU isCompatible = platform: parse.isCompatible final.parsed.cpu platform.parsed.cpu; # Derived meta-data @@ -79,11 +77,20 @@ rec { }; isStatic = final.isWasm || final.isRedox; - kernelArch = + # Just a guess, based on `system` + inherit + ({ + linux-kernel = args.linux-kernel or {}; + gcc = args.gcc or {}; + rustc = args.rust or {}; + } // platforms.select final) + linux-kernel gcc rustc; + + linuxArch = if final.isAarch32 then "arm" else if final.isAarch64 then "arm64" - else if final.isx86_32 then "x86" - else if final.isx86_64 then "x86" + else if final.isx86_32 then "i386" + else if final.isx86_64 then "x86_64" else if final.isMips then "mips" else final.parsed.cpu.name; @@ -129,7 +136,7 @@ rec { else throw "Don't know how to run ${final.config} executables."; } // mapAttrs (n: v: v final.parsed) inspect.predicates - // mapAttrs (n: v: v final.platform.gcc.arch or "default") architectures.predicates + // mapAttrs (n: v: v final.gcc.arch or "default") architectures.predicates // args; in assert final.useAndroidPrebuilt -> final.isAndroid; assert lib.foldl diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 16002450f2d..de12e0b83c1 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -7,7 +7,6 @@ let riscv = bits: { config = "riscv${bits}-unknown-linux-gnu"; - platform = platforms.riscv-multiplatform; }; in @@ -17,84 +16,68 @@ rec { # powernv = { config = "powerpc64le-unknown-linux-gnu"; - platform = platforms.powernv; }; musl-power = { config = "powerpc64le-unknown-linux-musl"; - platform = platforms.powernv; }; sheevaplug = { config = "armv5tel-unknown-linux-gnueabi"; - platform = platforms.sheevaplug; - }; + } // platforms.sheevaplug; raspberryPi = { config = "armv6l-unknown-linux-gnueabihf"; - platform = platforms.raspberrypi; - }; + } // platforms.raspberrypi; remarkable1 = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.zero-gravitas; - }; + } // platforms.zero-gravitas; remarkable2 = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.zero-sugar; - }; + } // platforms.zero-sugar; armv7l-hf-multiplatform = { config = "armv7l-unknown-linux-gnueabihf"; - platform = platforms.armv7l-hf-multiplatform; }; aarch64-multiplatform = { config = "aarch64-unknown-linux-gnu"; - platform = platforms.aarch64-multiplatform; }; armv7a-android-prebuilt = { config = "armv7a-unknown-linux-androideabi"; sdkVer = "29"; ndkVer = "21"; - platform = platforms.armv7a-android; useAndroidPrebuilt = true; - }; + } // platforms.armv7a-android; aarch64-android-prebuilt = { config = "aarch64-unknown-linux-android"; sdkVer = "29"; ndkVer = "21"; - platform = platforms.aarch64-multiplatform; useAndroidPrebuilt = true; }; - scaleway-c1 = armv7l-hf-multiplatform // rec { - platform = platforms.scaleway-c1; - inherit (platform.gcc) fpu; - }; + scaleway-c1 = armv7l-hf-multiplatform // platforms.scaleway-c1; pogoplug4 = { config = "armv5tel-unknown-linux-gnueabi"; - platform = platforms.pogoplug4; - }; + } // platforms.pogoplug4; ben-nanonote = { config = "mipsel-unknown-linux-uclibc"; - platform = platforms.ben_nanonote; - }; + } // platforms.ben_nanonote; fuloongminipc = { config = "mipsel-unknown-linux-gnu"; - platform = platforms.fuloong2f_n32; - }; + } // platforms.fuloong2f_n32; muslpi = raspberryPi // { config = "armv6l-unknown-linux-musleabihf"; }; - aarch64-multiplatform-musl = aarch64-multiplatform // { + aarch64-multiplatform-musl = { config = "aarch64-unknown-linux-musl"; }; @@ -110,13 +93,11 @@ rec { riscv64-embedded = { config = "riscv64-none-elf"; libc = "newlib"; - platform = platforms.riscv-multiplatform; }; riscv32-embedded = { config = "riscv32-none-elf"; libc = "newlib"; - platform = platforms.riscv-multiplatform; }; mmix = { @@ -136,13 +117,11 @@ rec { vc4 = { config = "vc4-elf"; libc = "newlib"; - platform = {}; }; or1k = { config = "or1k-elf"; libc = "newlib"; - platform = {}; }; arm-embedded = { @@ -204,7 +183,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; - platform = {}; }; iphone32 = { @@ -214,7 +192,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneOS"; useiOSPrebuilt = true; - platform = {}; }; iphone64-simulator = { @@ -224,7 +201,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; - platform = {}; }; iphone32-simulator = { @@ -234,7 +210,6 @@ rec { xcodeVer = "11.3.1"; xcodePlatform = "iPhoneSimulator"; useiOSPrebuilt = true; - platform = {}; }; # @@ -245,7 +220,6 @@ rec { mingw32 = { config = "i686-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - platform = {}; }; # 64 bit mingw-w64 @@ -253,7 +227,6 @@ rec { # That's the triplet they use in the mingw-w64 docs. config = "x86_64-w64-mingw32"; libc = "msvcrt"; # This distinguishes the mingw (non posix) toolchain - platform = {}; }; # BSDs @@ -275,6 +248,5 @@ rec { # Ghcjs ghcjs = { config = "js-unknown-ghcjs"; - platform = {}; }; } diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index e869de488c1..f399c1873f5 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -1,39 +1,36 @@ { lib }: rec { - pcBase = { - name = "pc"; - kernelBaseConfig = "defconfig"; - # Build whatever possible as a module, if not stated in the extra config. - kernelAutoModules = true; - kernelTarget = "bzImage"; - }; - - pc64 = pcBase // { kernelArch = "x86_64"; }; - - pc32 = pcBase // { kernelArch = "i386"; }; - - pc32_simplekernel = pc32 // { - kernelAutoModules = false; + pc = { + linux-kernel = { + name = "pc"; + + baseConfig = "defconfig"; + # Build whatever possible as a module, if not stated in the extra config. + autoModules = true; + target = "bzImage"; + }; }; - pc64_simplekernel = pc64 // { - kernelAutoModules = false; + pc_simplekernel = lib.recursiveUpdate pc { + linux-kernel.autoModules = false; }; powernv = { - name = "PowerNV"; - kernelArch = "powerpc"; - kernelBaseConfig = "powernv_defconfig"; - kernelTarget = "zImage"; - kernelInstallTarget = "install"; - kernelFile = "vmlinux"; - kernelAutoModules = true; - # avoid driver/FS trouble arising from unusual page size - kernelExtraConfig = '' - PPC_64K_PAGES n - PPC_4K_PAGES y - IPV6 y - ''; + linux-kernel = { + name = "PowerNV"; + + baseConfig = "powernv_defconfig"; + target = "zImage"; + installTarget = "install"; + file = "vmlinux"; + autoModules = true; + # avoid driver/FS trouble arising from unusual page size + extraConfig = '' + PPC_64K_PAGES n + PPC_4K_PAGES y + IPV6 y + ''; + }; }; ## @@ -41,17 +38,121 @@ rec { ## pogoplug4 = { - name = "pogoplug4"; + linux-kernel = { + name = "pogoplug4"; + baseConfig = "multi_v5_defconfig"; + autoModules = false; + extraConfig = '' + # Ubi for the mtd + MTD_UBI y + UBIFS_FS y + UBIFS_FS_XATTR y + UBIFS_FS_ADVANCED_COMPR y + UBIFS_FS_LZO y + UBIFS_FS_ZLIB y + UBIFS_FS_DEBUG n + ''; + makeFlags = [ "LOADADDR=0x8000" ]; + target = "uImage"; + # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working + #DTB = true; + }; gcc = { arch = "armv5te"; }; + }; + + sheevaplug = { + linux-kernel = { + name = "sheevaplug"; + + baseConfig = "multi_v5_defconfig"; + autoModules = false; + extraConfig = '' + BLK_DEV_RAM y + BLK_DEV_INITRD y + BLK_DEV_CRYPTOLOOP m + BLK_DEV_DM m + DM_CRYPT m + MD y + REISERFS_FS m + BTRFS_FS m + XFS_FS m + JFS_FS m + EXT4_FS m + USB_STORAGE_CYPRESS_ATACB m + + # mv cesa requires this sw fallback, for mv-sha1 + CRYPTO_SHA1 y + # Fast crypto + CRYPTO_TWOFISH y + CRYPTO_TWOFISH_COMMON y + CRYPTO_BLOWFISH y + CRYPTO_BLOWFISH_COMMON y + + IP_PNP y + IP_PNP_DHCP y + NFS_FS y + ROOT_NFS y + TUN m + NFS_V4 y + NFS_V4_1 y + NFS_FSCACHE y + NFSD m + NFSD_V2_ACL y + NFSD_V3 y + NFSD_V3_ACL y + NFSD_V4 y + NETFILTER y + IP_NF_IPTABLES y + IP_NF_FILTER y + IP_NF_MATCH_ADDRTYPE y + IP_NF_TARGET_LOG y + IP_NF_MANGLE y + IPV6 m + VLAN_8021Q m + + CIFS y + CIFS_XATTR y + CIFS_POSIX y + CIFS_FSCACHE y + CIFS_ACL y + + WATCHDOG y + WATCHDOG_CORE y + ORION_WATCHDOG m + + ZRAM m + NETCONSOLE m + + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + + # Fail to build + DRM n + SCSI_ADVANSYS n + USB_ISP1362_HCD n + SND_SOC n + SND_ALI5451 n + FB_SAVAGE n + SCSI_NSP32 n + ATA_SFF n + SUNGEM n + IRDA n + ATM_HE n + SCSI_ACARD n + BLK_DEV_CMD640_ENHANCED n + + FUSE_FS m + + # systemd uses cgroups + CGROUPS y + + # Latencytop + LATENCYTOP y - kernelBaseConfig = "multi_v5_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelExtraConfig = - '' # Ubi for the mtd MTD_UBI y UBIFS_FS y @@ -60,137 +161,36 @@ rec { UBIFS_FS_LZO y UBIFS_FS_ZLIB y UBIFS_FS_DEBUG n - ''; - kernelMakeFlags = [ "LOADADDR=0x8000" ]; - kernelTarget = "uImage"; - # TODO reenable once manual-config's config actually builds a .dtb and this is checked to be working - #kernelDTB = true; - }; - sheevaplug = { - name = "sheevaplug"; - kernelBaseConfig = "multi_v5_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelExtraConfig = '' - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - BTRFS_FS m - XFS_FS m - JFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - # mv cesa requires this sw fallback, for mv-sha1 - CRYPTO_SHA1 y - # Fast crypto - CRYPTO_TWOFISH y - CRYPTO_TWOFISH_COMMON y - CRYPTO_BLOWFISH y - CRYPTO_BLOWFISH_COMMON y - - IP_PNP y - IP_PNP_DHCP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - NETFILTER y - IP_NF_IPTABLES y - IP_NF_FILTER y - IP_NF_MATCH_ADDRTYPE y - IP_NF_TARGET_LOG y - IP_NF_MANGLE y - IPV6 m - VLAN_8021Q m - - CIFS y - CIFS_XATTR y - CIFS_POSIX y - CIFS_FSCACHE y - CIFS_ACL y - - WATCHDOG y - WATCHDOG_CORE y - ORION_WATCHDOG m - - ZRAM m - NETCONSOLE m - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # systemd uses cgroups - CGROUPS y - - # Latencytop - LATENCYTOP y - - # Ubi for the mtd - MTD_UBI y - UBIFS_FS y - UBIFS_FS_XATTR y - UBIFS_FS_ADVANCED_COMPR y - UBIFS_FS_LZO y - UBIFS_FS_ZLIB y - UBIFS_FS_DEBUG n - - # Kdb, for kernel troubles - KGDB y - KGDB_SERIAL_CONSOLE y - KGDB_KDB y - ''; - kernelMakeFlags = [ "LOADADDR=0x0200000" ]; - kernelTarget = "uImage"; - kernelDTB = true; # Beyond 3.10 + # Kdb, for kernel troubles + KGDB y + KGDB_SERIAL_CONSOLE y + KGDB_KDB y + ''; + makeFlags = [ "LOADADDR=0x0200000" ]; + target = "uImage"; + DTB = true; # Beyond 3.10 + }; gcc = { arch = "armv5te"; }; }; raspberrypi = { - name = "raspberrypi"; - kernelBaseConfig = "bcm2835_defconfig"; - kernelDTB = true; - kernelArch = "arm"; - kernelAutoModules = true; - kernelPreferBuiltin = true; - kernelExtraConfig = '' - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; - kernelTarget = "zImage"; + linux-kernel = { + name = "raspberrypi"; + + baseConfig = "bcm2835_defconfig"; + DTB = true; + autoModules = true; + preferBuiltin = true; + extraConfig = '' + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + ''; + target = "zImage"; + }; gcc = { arch = "armv6"; fpu = "vfp"; @@ -201,13 +201,15 @@ rec { raspberrypi2 = armv7l-hf-multiplatform; zero-gravitas = { - name = "zero-gravitas"; - kernelBaseConfig = "zero-gravitas_defconfig"; - kernelArch = "arm"; - # kernelTarget verified by checking /boot on reMarkable 1 device - kernelTarget = "zImage"; - kernelAutoModules = false; - kernelDTB = true; + linux-kernel = { + name = "zero-gravitas"; + + baseConfig = "zero-gravitas_defconfig"; + # Target verified by checking /boot on reMarkable 1 device + target = "zImage"; + autoModules = false; + DTB = true; + }; gcc = { fpu = "neon"; cpu = "cortex-a9"; @@ -215,13 +217,15 @@ rec { }; zero-sugar = { - name = "zero-sugar"; - kernelBaseConfig = "zero-sugar_defconfig"; - kernelArch = "arm"; - kernelDTB = true; - kernelAutoModules = false; - kernelPreferBuiltin = true; - kernelTarget = "zImage"; + linux-kernel = { + name = "zero-sugar"; + + baseConfig = "zero-sugar_defconfig"; + DTB = true; + autoModules = false; + preferBuiltin = true; + target = "zImage"; + }; gcc = { cpu = "cortex-a7"; fpu = "neon-vfpv4"; @@ -229,7 +233,7 @@ rec { }; }; - scaleway-c1 = armv7l-hf-multiplatform // { + scaleway-c1 = lib.recursiveUpdate armv7l-hf-multiplatform { gcc = { cpu = "cortex-a9"; fpu = "vfpv3"; @@ -237,12 +241,11 @@ rec { }; utilite = { - name = "utilite"; - kernelBaseConfig = "multi_v7_defconfig"; - kernelArch = "arm"; - kernelAutoModules = false; - kernelExtraConfig = - '' + linux-kernel = { + name = "utilite"; + maseConfig = "multi_v7_defconfig"; + autoModules = false; + extraConfig = '' # Ubi for the mtd MTD_UBI y UBIFS_FS y @@ -252,35 +255,37 @@ rec { UBIFS_FS_ZLIB y UBIFS_FS_DEBUG n ''; - kernelMakeFlags = [ "LOADADDR=0x10800000" ]; - kernelTarget = "uImage"; - kernelDTB = true; + makeFlags = [ "LOADADDR=0x10800000" ]; + target = "uImage"; + DTB = true; + }; gcc = { cpu = "cortex-a9"; fpu = "neon"; }; }; - guruplug = sheevaplug // { + guruplug = lib.recursiveUpdate sheevaplug { # Define `CONFIG_MACH_GURUPLUG' (see # ) # and other GuruPlug-specific things. Requires the `guruplug-defconfig' # patch. - - kernelBaseConfig = "guruplug_defconfig"; + linux-kernel.baseConfig = "guruplug_defconfig"; }; - beaglebone = armv7l-hf-multiplatform // { - name = "beaglebone"; - kernelBaseConfig = "bb.org_defconfig"; - kernelAutoModules = false; - kernelExtraConfig = ""; # TBD kernel config - kernelTarget = "zImage"; + beaglebone = lib.recursiveUpdate armv7l-hf-multiplatform { + linux-kernel = { + name = "beaglebone"; + baseConfig = "bb.org_defconfig"; + autoModules = false; + extraConfig = ""; # TBD kernel config + target = "zImage"; + }; }; # https://developer.android.com/ndk/guides/abis#v7a - armv7a-android = { - name = "armeabi-v7a"; + armv7a-android = { + linux-kernel.name = "armeabi-v7a"; gcc = { arch = "armv7-a"; float-abi = "softfp"; @@ -289,29 +294,31 @@ rec { }; armv7l-hf-multiplatform = { - name = "armv7l-hf-multiplatform"; - kernelBaseConfig = "multi_v7_defconfig"; - kernelArch = "arm"; - kernelDTB = true; - kernelAutoModules = true; - kernelPreferBuiltin = true; - kernelTarget = "zImage"; - kernelExtraConfig = '' - # Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig. - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Fix broken sunxi-sid nvmem driver. - TI_CPTS y - - # Hangs ODROID-XU4 - ARM_BIG_LITTLE_CPUIDLE n - - # Disable OABI to have seccomp_filter (required for systemd) - # https://github.com/raspberrypi/firmware/issues/651 - OABI_COMPAT n - ''; + linux-kernel = { + name = "armv7l-hf-multiplatform"; + Major = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc. + baseConfig = "multi_v7_defconfig"; + DTB = true; + autoModules = true; + PreferBuiltin = true; + target = "zImage"; + extraConfig = '' + # Serial port for Raspberry Pi 3. Upstream forgot to add it to the ARMv7 defconfig. + SERIAL_8250_BCM2835AUX y + SERIAL_8250_EXTENDED y + SERIAL_8250_SHARE_IRQ y + + # Fix broken sunxi-sid nvmem driver. + TI_CPTS y + + # Hangs ODROID-XU4 + ARM_BIG_LITTLE_CPUIDLE n + + # Disable OABI to have seccomp_filter (required for systemd) + # https://github.com/raspberrypi/firmware/issues/651 + OABI_COMPAT n + ''; + }; gcc = { # Some table about fpu flags: # http://community.arm.com/servlet/JiveServlet/showImage/38-1981-3827/blogentry-103749-004812900+1365712953_thumb.png @@ -336,34 +343,35 @@ rec { }; aarch64-multiplatform = { - name = "aarch64-multiplatform"; - kernelBaseConfig = "defconfig"; - kernelArch = "arm64"; - kernelDTB = true; - kernelAutoModules = true; - kernelPreferBuiltin = true; - kernelExtraConfig = '' - # Raspberry Pi 3 stuff. Not needed for kernels >= 4.10. - ARCH_BCM2835 y - BCM2835_MBOX y - BCM2835_WDT y - RASPBERRYPI_FIRMWARE y - RASPBERRYPI_POWER y - SERIAL_8250_BCM2835AUX y - SERIAL_8250_EXTENDED y - SERIAL_8250_SHARE_IRQ y - - # Cavium ThunderX stuff. - PCI_HOST_THUNDER_ECAM y - - # Nvidia Tegra stuff. - PCI_TEGRA y - - # The default (=y) forces us to have the XHCI firmware available in initrd, - # which our initrd builder can't currently do easily. - USB_XHCI_TEGRA m - ''; - kernelTarget = "Image"; + linux-kernel = { + name = "aarch64-multiplatform"; + baseConfig = "defconfig"; + DTB = true; + autoModules = true; + preferBuiltin = true; + extraConfig = '' + # Raspberry Pi 3 stuff. Not needed for s >= 4.10. + ARCH_BCM2835 y + BCM2835_MBOX y + BCM2835_WDT y + RASPBERRYPI_FIRMWARE y + RASPBERRYPI_POWER y + SERIAL_8250_BCM2835AUX y + SERIAL_8250_EXTENDED y + SERIAL_8250_SHARE_IRQ y + + # Cavium ThunderX stuff. + PCI_HOST_THUNDER_ECAM y + + # Nvidia Tegra stuff. + PCI_TEGRA y + + # The default (=y) forces us to have the XHCI firmware available in initrd, + # which our initrd builder can't currently do easily. + USB_XHCI_TEGRA m + ''; + target = "Image"; + }; gcc = { arch = "armv8-a"; }; @@ -374,8 +382,9 @@ rec { ## ben_nanonote = { - name = "ben_nanonote"; - kernelArch = "mips"; + linux-kernel = { + name = "ben_nanonote"; + }; gcc = { arch = "mips32"; float = "soft"; @@ -383,75 +392,76 @@ rec { }; fuloong2f_n32 = { - name = "fuloong2f_n32"; - kernelBaseConfig = "lemote2f_defconfig"; - kernelArch = "mips"; - kernelAutoModules = false; - kernelExtraConfig = '' - MIGRATION n - COMPACTION n - - # nixos mounts some cgroup - CGROUPS y - - BLK_DEV_RAM y - BLK_DEV_INITRD y - BLK_DEV_CRYPTOLOOP m - BLK_DEV_DM m - DM_CRYPT m - MD y - REISERFS_FS m - EXT4_FS m - USB_STORAGE_CYPRESS_ATACB m - - IP_PNP y - IP_PNP_DHCP y - IP_PNP_BOOTP y - NFS_FS y - ROOT_NFS y - TUN m - NFS_V4 y - NFS_V4_1 y - NFS_FSCACHE y - NFSD m - NFSD_V2_ACL y - NFSD_V3 y - NFSD_V3_ACL y - NFSD_V4 y - - # Fail to build - DRM n - SCSI_ADVANSYS n - USB_ISP1362_HCD n - SND_SOC n - SND_ALI5451 n - FB_SAVAGE n - SCSI_NSP32 n - ATA_SFF n - SUNGEM n - IRDA n - ATM_HE n - SCSI_ACARD n - BLK_DEV_CMD640_ENHANCED n - - FUSE_FS m - - # Needed for udev >= 150 - SYSFS_DEPRECATED_V2 n - - VGA_CONSOLE n - VT_HW_CONSOLE_BINDING y - SERIAL_8250_CONSOLE y - FRAMEBUFFER_CONSOLE y - EXT2_FS y - EXT3_FS y - REISERFS_FS y - MAGIC_SYSRQ y - - # The kernel doesn't boot at all, with FTRACE - FTRACE n - ''; - kernelTarget = "vmlinux"; + linux-kernel = { + name = "fuloong2f_n32"; + baseConfig = "lemote2f_defconfig"; + autoModules = false; + extraConfig = '' + MIGRATION n + COMPACTION n + + # nixos mounts some cgroup + CGROUPS y + + BLK_DEV_RAM y + BLK_DEV_INITRD y + BLK_DEV_CRYPTOLOOP m + BLK_DEV_DM m + DM_CRYPT m + MD y + REISERFS_FS m + EXT4_FS m + USB_STORAGE_CYPRESS_ATACB m + + IP_PNP y + IP_PNP_DHCP y + IP_PNP_BOOTP y + NFS_FS y + ROOT_NFS y + TUN m + NFS_V4 y + NFS_V4_1 y + NFS_FSCACHE y + NFSD m + NFSD_V2_ACL y + NFSD_V3 y + NFSD_V3_ACL y + NFSD_V4 y + + # Fail to build + DRM n + SCSI_ADVANSYS n + USB_ISP1362_HCD n + SND_SOC n + SND_ALI5451 n + FB_SAVAGE n + SCSI_NSP32 n + ATA_SFF n + SUNGEM n + IRDA n + ATM_HE n + SCSI_ACARD n + BLK_DEV_CMD640_ENHANCED n + + FUSE_FS m + + # Needed for udev >= 150 + SYSFS_DEPRECATED_V2 n + + VGA_CONSOLE n + VT_HW_CONSOLE_BINDING y + SERIAL_8250_CONSOLE y + FRAMEBUFFER_CONSOLE y + EXT2_FS y + EXT3_FS y + REISERFS_FS y + MAGIC_SYSRQ y + + # The kernel doesn't boot at all, with FTRACE + FTRACE n + ''; + target = "vmlinux"; + }; gcc = { arch = "loongson2f"; float = "hard"; @@ -464,34 +474,36 @@ rec { ## riscv-multiplatform = { - name = "riscv-multiplatform"; - kernelArch = "riscv"; - kernelTarget = "vmlinux"; - kernelAutoModules = true; - kernelBaseConfig = "defconfig"; - kernelExtraConfig = '' - FTRACE n - SERIAL_OF_PLATFORM y - ''; + linux-kernel = { + name = "riscv-multiplatform"; + target = "vmlinux"; + autoModules = true; + baseConfig = "defconfig"; + extraConfig = '' + FTRACE n + SERIAL_OF_PLATFORM y + ''; + }; }; select = platform: # x86 - /**/ if platform.isx86_32 then pc32 - else if platform.isx86_64 then pc64 + /**/ if platform.isx86 then pc # ARM else if platform.isAarch32 then let version = platform.parsed.cpu.version or null; - in if version == null then pcBase + in if version == null then pc else if lib.versionOlder version "6" then sheevaplug else if lib.versionOlder version "7" then raspberrypi else armv7l-hf-multiplatform else if platform.isAarch64 then aarch64-multiplatform + else if platform.isRiscV then riscv-multiplatform + else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then fuloong2f_n32 else if platform.parsed.cpu == lib.systems.parse.cpuTypes.powerpc64le then powernv - else pcBase; + else pc; } diff --git a/nixos/doc/manual/release-notes/rl-2103.xml b/nixos/doc/manual/release-notes/rl-2103.xml index 94e42369b60..c706cd30fce 100644 --- a/nixos/doc/manual/release-notes/rl-2103.xml +++ b/nixos/doc/manual/release-notes/rl-2103.xml @@ -603,6 +603,22 @@ http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/e /etc/netgroup defines network-wide groups and may affect to setups using NIS. + + + Platforms, like stdenv.hostPlatform, no longer have a platform attribute. + It has been (mostly) flattoned away: + + + platform.gcc is now gcc + platform.kernel* is now linux-kernel.* + + + Additionally, platform.kernelArch moved to the top level as linuxArch to match the other *Arch variables. + + + The platform grouping of these things never meant anything, and was just a historial/implementation artifact that was overdue removal. + + diff --git a/nixos/modules/hardware/device-tree.nix b/nixos/modules/hardware/device-tree.nix index e0ab37bca63..4aa1d6369d1 100644 --- a/nixos/modules/hardware/device-tree.nix +++ b/nixos/modules/hardware/device-tree.nix @@ -68,11 +68,11 @@ let patchShebangs scripts/* substituteInPlace scripts/Makefile.lib \ --replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@' - make ${pkgs.stdenv.hostPlatform.platform.kernelBaseConfig} ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" - make dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" + make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" + make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" ''; installPhase = '' - make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.platform.kernelArch}" + make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}" ''; }; @@ -115,7 +115,7 @@ in options = { hardware.deviceTree = { enable = mkOption { - default = pkgs.stdenv.hostPlatform.platform.kernelDTB or false; + default = pkgs.stdenv.hostPlatform.linux-kernel.DTB or false; type = types.bool; description = '' Build device tree files. These are used to describe the diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index 95eba86bcb6..fa074fdfcc6 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -88,7 +88,7 @@ with lib; system.build.netbootIpxeScript = pkgs.writeTextDir "netboot.ipxe" '' #!ipxe - kernel ${pkgs.stdenv.hostPlatform.platform.kernelTarget} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} + kernel ${pkgs.stdenv.hostPlatform.linux-kernel.target} init=${config.system.build.toplevel}/init initrd=initrd ${toString config.boot.kernelParams} initrd initrd boot ''; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 0eeff31d6c4..64bdbf159d5 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -587,10 +587,10 @@ in nix.systemFeatures = mkDefault ( [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++ - optionals (pkgs.hostPlatform.platform ? gcc.arch) ( - # a builder can run code for `platform.gcc.arch` and inferior architectures - [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ - map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch} + optionals (pkgs.hostPlatform ? gcc.arch) ( + # a builder can run code for `gcc.arch` and inferior architectures + [ "gccarch-${pkgs.hostPlatform.gcc.arch}" ] ++ + map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.gcc.arch} ) ); diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix index 03d7e749323..b0f77ca3fb8 100644 --- a/nixos/modules/system/activation/top-level.nix +++ b/nixos/modules/system/activation/top-level.nix @@ -190,7 +190,7 @@ in system.boot.loader.kernelFile = mkOption { internal = true; - default = pkgs.stdenv.hostPlatform.platform.kernelTarget; + default = pkgs.stdenv.hostPlatform.linux-kernel.target; type = types.str; description = '' Name of the kernel file to be passed to the bootloader. diff --git a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix index 2d27611946e..fee567a510b 100644 --- a/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix +++ b/nixos/modules/system/boot/loader/generations-dir/generations-dir.nix @@ -59,7 +59,7 @@ in system.build.installBootLoader = generationsDirBuilder; system.boot.loader.id = "generationsDir"; - system.boot.loader.kernelFile = platform.kernelTarget; + system.boot.loader.kernelFile = linux-kernel.target; }; } diff --git a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix index ba936b26573..db22dd36cbe 100644 --- a/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix +++ b/nixos/modules/system/boot/loader/raspberrypi/raspberrypi.nix @@ -103,6 +103,6 @@ in system.build.installBootLoader = builder; system.boot.loader.id = "raspberrypi"; - system.boot.loader.kernelFile = platform.kernelTarget; + system.boot.loader.kernelFile = linux-kernel.target; }; } diff --git a/nixos/release.nix b/nixos/release.nix index 1f5c1581269..109747945f7 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -79,7 +79,7 @@ let in tarball // { meta = { - description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.platform.name}"; + description = "NixOS system tarball for ${system} - ${stdenv.hostPlatform.linux-kernel.name}"; maintainers = map (x: lib.maintainers.${x}) maintainers; }; inherit config; @@ -105,7 +105,7 @@ let modules = makeModules module {}; }; build = configEvaled.config.system.build; - kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.platform.kernelTarget; + kernelTarget = configEvaled.pkgs.stdenv.hostPlatform.linux-kernel.target; in pkgs.symlinkJoin { name = "netboot"; diff --git a/pkgs/applications/audio/virtual-ans/default.nix b/pkgs/applications/audio/virtual-ans/default.nix index dd7e8b062da..1cb9c0f18bf 100644 --- a/pkgs/applications/audio/virtual-ans/default.nix +++ b/pkgs/applications/audio/virtual-ans/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { startScript = if stdenv.isx86_32 then "START_LINUX_X86" else if stdenv.isx86_64 then "START_LINUX_X86_64" #else if stdenv.isDarwin then "START_MACOS.app" # disabled because I cannot test on Darwin - else abort "Unsupported platform: ${stdenv.platform.kernelArch}."; + else abort "Unsupported platform: ${stdenv.hostPlatform.linuxArch}."; linuxExecutable = if stdenv.isx86_32 then "pixilang_linux_x86" else if stdenv.isx86_64 then "pixilang_linux_x86_64" diff --git a/pkgs/applications/virtualization/crosvm/default.nix b/pkgs/applications/virtualization/crosvm/default.nix index 3ad540e5307..848b93a5381 100644 --- a/pkgs/applications/virtualization/crosvm/default.nix +++ b/pkgs/applications/virtualization/crosvm/default.nix @@ -75,7 +75,7 @@ in CROSVM_CARGO_TEST_KERNEL_BINARY = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) - "${linux}/${stdenv.hostPlatform.platform.kernelTarget}"; + "${linux}/${stdenv.hostPlatform.linux-kernel.target}"; passthru = { inherit adhdSrc; diff --git a/pkgs/applications/virtualization/vpcs/default.nix b/pkgs/applications/virtualization/vpcs/default.nix index 33d707a5007..8c41a1f4c27 100644 --- a/pkgs/applications/virtualization/vpcs/default.nix +++ b/pkgs/applications/virtualization/vpcs/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { buildPhase = ''( cd src - ./mk.sh ${stdenv.buildPlatform.platform.kernelArch} + ./mk.sh ${stdenv.buildPlatform.linuxArch} )''; installPhase = '' diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index bd3ebdf800e..e0d43739668 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -190,7 +190,7 @@ stdenv.mkDerivation { else if targetPlatform.isRiscV then "lriscv" else throw "unknown emulation for platform: ${targetPlatform.config}"; in if targetPlatform.useLLVM or false then "" - else targetPlatform.platform.bfdEmulation or (fmt + sep + arch); + else targetPlatform.bfdEmulation or (fmt + sep + arch); strictDeps = true; depsTargetTargetPropagated = extraPackages; diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index d1d5f8e6c86..e0153ffc17f 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -402,32 +402,32 @@ stdenv.mkDerivation { # Always add -march based on cpu in triple. Sometimes there is a # discrepency (x86_64 vs. x86-64), so we provide an "arch" arg in # that case. - + optionalString ((targetPlatform ? platform.gcc.arch) && - isGccArchSupported targetPlatform.platform.gcc.arch) '' - echo "-march=${targetPlatform.platform.gcc.arch}" >> $out/nix-support/cc-cflags-before + + optionalString ((targetPlatform ? gcc.arch) && + isGccArchSupported targetPlatform.gcc.arch) '' + echo "-march=${targetPlatform.gcc.arch}" >> $out/nix-support/cc-cflags-before '' # -mcpu is not very useful. You should use mtune and march # instead. It’s provided here for backwards compatibility. - + optionalString (targetPlatform ? platform.gcc.cpu) '' - echo "-mcpu=${targetPlatform.platform.gcc.cpu}" >> $out/nix-support/cc-cflags-before + + optionalString (targetPlatform ? gcc.cpu) '' + echo "-mcpu=${targetPlatform.gcc.cpu}" >> $out/nix-support/cc-cflags-before '' # -mfloat-abi only matters on arm32 but we set it here # unconditionally just in case. If the abi specifically sets hard # vs. soft floats we use it here. - + optionalString (targetPlatform ? platform.gcc.float-abi) '' - echo "-mfloat-abi=${targetPlatform.platform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before + + optionalString (targetPlatform ? gcc.float-abi) '' + echo "-mfloat-abi=${targetPlatform.gcc.float-abi}" >> $out/nix-support/cc-cflags-before '' - + optionalString (targetPlatform ? platform.gcc.fpu) '' - echo "-mfpu=${targetPlatform.platform.gcc.fpu}" >> $out/nix-support/cc-cflags-before + + optionalString (targetPlatform ? gcc.fpu) '' + echo "-mfpu=${targetPlatform.gcc.fpu}" >> $out/nix-support/cc-cflags-before '' - + optionalString (targetPlatform ? platform.gcc.mode) '' - echo "-mmode=${targetPlatform.platform.gcc.mode}" >> $out/nix-support/cc-cflags-before + + optionalString (targetPlatform ? gcc.mode) '' + echo "-mmode=${targetPlatform.gcc.mode}" >> $out/nix-support/cc-cflags-before '' - + optionalString (targetPlatform ? platform.gcc.tune && - isGccArchSupported targetPlatform.platform.gcc.tune) '' - echo "-mtune=${targetPlatform.platform.gcc.tune}" >> $out/nix-support/cc-cflags-before + + optionalString (targetPlatform ? gcc.tune && + isGccArchSupported targetPlatform.gcc.tune) '' + echo "-mtune=${targetPlatform.gcc.tune}" >> $out/nix-support/cc-cflags-before '' # TODO: categorize these and figure out a better place for them diff --git a/pkgs/build-support/kernel/make-initrd.nix b/pkgs/build-support/kernel/make-initrd.nix index 901eb311a88..9af40d33242 100644 --- a/pkgs/build-support/kernel/make-initrd.nix +++ b/pkgs/build-support/kernel/make-initrd.nix @@ -56,13 +56,13 @@ in , prepend ? [] # Whether to wrap the initramfs in a u-boot image. -, makeUInitrd ? stdenvNoCC.hostPlatform.platform.kernelTarget == "uImage" +, makeUInitrd ? stdenvNoCC.hostPlatform.linux-kernel.target == "uImage" # If generating a u-boot image, the architecture to use. The default # guess may not align with u-boot's nomenclature correctly, so it can # be overridden. # See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list. -, uInitrdArch ? stdenvNoCC.hostPlatform.kernelArch +, uInitrdArch ? stdenvNoCC.hostPlatform.linuxArch # The name of the compression, as recognised by u-boot. # See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list. diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 5f3c7e1d621..215782368f6 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -1,6 +1,6 @@ { pkgs , kernel ? pkgs.linux -, img ? pkgs.stdenv.hostPlatform.platform.kernelTarget +, img ? pkgs.stdenv.hostPlatform.linux-kernel.target , storeDir ? builtins.storeDir , rootModules ? [ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ] diff --git a/pkgs/development/compilers/gcc/common/platform-flags.nix b/pkgs/development/compilers/gcc/common/platform-flags.nix index f3cdce41193..66af8c4a4cc 100644 --- a/pkgs/development/compilers/gcc/common/platform-flags.nix +++ b/pkgs/development/compilers/gcc/common/platform-flags.nix @@ -1,7 +1,7 @@ { lib, targetPlatform }: let - p = targetPlatform.platform.gcc or {} + p = targetPlatform.gcc or {} // targetPlatform.parsed.abi; in lib.concatLists [ (lib.optional (!targetPlatform.isx86_64 && p ? arch) "--with-arch=${p.arch}") # --with-arch= is unknown flag on x86_64 diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index 0325632ad0a..78f7c2ef1b9 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -123,7 +123,7 @@ stdenv.mkDerivation rec { let arch = stdenv.lib.head (stdenv.lib.splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/compilers/julia/1.3.nix b/pkgs/development/compilers/julia/1.3.nix index 8096af0b320..2a270b7c72c 100644 --- a/pkgs/development/compilers/julia/1.3.nix +++ b/pkgs/development/compilers/julia/1.3.nix @@ -73,7 +73,7 @@ stdenv.mkDerivation rec { let arch = head (splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/compilers/julia/1.5.nix b/pkgs/development/compilers/julia/1.5.nix index be3cfc39635..778a9c3a9d7 100644 --- a/pkgs/development/compilers/julia/1.5.nix +++ b/pkgs/development/compilers/julia/1.5.nix @@ -71,7 +71,7 @@ stdenv.mkDerivation rec { let arch = head (splitString "-" stdenv.system); march = { - x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; + x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; i686 = "pentium4"; aarch64 = "armv8-a"; }.${arch} diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 6b17e463d76..6637a9bb2a3 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -158,7 +158,7 @@ stdenv.mkDerivation ({ "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ (lib.flip lib.withFeature "fp" - (stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) + (stdenv.hostPlatform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft")) "--with-__thread" ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [ "--host=arm-linux-gnueabi" diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index e6ab23073b1..1a3f1948f84 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -88,7 +88,7 @@ qtModule { NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [ # with gcc8, -Wclass-memaccess became part of -Wall and this exceeds the logging limit "-Wno-class-memaccess" - ] ++ lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ + ] ++ lib.optionals (stdenv.hostPlatform.gcc.arch or "" == "sandybridge") [ # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940 # TODO: investigate and fix properly "-march=westmere" diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix index e333bd49718..edf556377b3 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep425.nix @@ -73,9 +73,9 @@ let if isLinux then ( - x: x.platform == "manylinux1_${stdenv.platform.kernelArch}" - || x.platform == "manylinux2010_${stdenv.platform.kernelArch}" - || x.platform == "manylinux2014_${stdenv.platform.kernelArch}" + x: x.platform == "manylinux1_${stdenv.hostPlatform.linuxArch}" + || x.platform == "manylinux2010_${stdenv.hostPlatform.linuxArch}" + || x.platform == "manylinux2014_${stdenv.hostPlatform.linuxArch}" || x.platform == "any" ) else (x: hasInfix "macosx" x.platform || x.platform == "any"); diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix index ba8145398f5..ea2f27b0e22 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/pep508.nix @@ -95,7 +95,7 @@ let else if stdenv.isDarwin then "darwin" else throw "Unsupported platform" ); - platform_machine = stdenv.platform.kernelArch; + platform_machine = stdenv.hostPlatform.linuxArch; platform_python_implementation = let impl = python.passthru.implementation; diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index 5308149c26b..ccea8ee4553 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -60,18 +60,17 @@ in configureFlags = let isCross = stdenv.hostPlatform != stdenv.buildPlatform; - host = stdenv.hostPlatform.platform; - isAarch32 = stdenv.hostPlatform.isAarch32; + inherit (stdenv.hostPlatform) gcc isArch32; in sharedConfigureFlags ++ [ "--without-dtrace" ] ++ (optionals isCross [ "--cross-compiling" "--without-intl" "--without-snapshot" - ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" host.gcc) [ - "--with-arm-fpu=${host.gcc.fpu}" - ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" host.gcc) [ - "--with-arm-float-abi=${host.gcc.float-abi}" + ]) ++ (optionals (isCross && isAarch32 && hasAttr "fpu" gcc) [ + "--with-arm-fpu=${gcc.fpu}" + ]) ++ (optionals (isCross && isAarch32 && hasAttr "float-abi" gcc) [ + "--with-arm-float-abi=${gcc.float-abi}" ]) ++ (optionals (isCross && isAarch32) [ "--dest-cpu=arm" ]) ++ extraConfigFlags; diff --git a/pkgs/os-specific/linux/exfat/default.nix b/pkgs/os-specific/linux/exfat/default.nix index 88792346d70..958bcdb9f16 100644 --- a/pkgs/os-specific/linux/exfat/default.nix +++ b/pkgs/os-specific/linux/exfat/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { makeFlags = [ "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" + "ARCH=${stdenv.hostPlatform.linuxArch}" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix index cadf65a7220..d6ed7bccba3 100644 --- a/pkgs/os-specific/linux/kernel-headers/default.nix +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -7,7 +7,7 @@ let pname = "linux-headers"; inherit version; - ARCH = stdenvNoCC.hostPlatform.platform.kernelArch or stdenvNoCC.hostPlatform.kernelArch; + ARCH = stdenvNoCC.hostPlatform.linuxArch; # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc. # We do this so we have a build->build, not build->host, C compiler. diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 31a90dc740f..ac9d6fbb2b5 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -42,7 +42,7 @@ # symbolic name and `patch' is the actual patch. The patch may # optionally be compressed with gzip or bzip2. kernelPatches ? [] -, ignoreConfigErrors ? stdenv.hostPlatform.platform.name != "pc" || +, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc" || stdenv.hostPlatform != stdenv.buildPlatform , extraMeta ? {} @@ -51,10 +51,10 @@ , isLibre ? false , isHardened ? false -# easy overrides to stdenv.hostPlatform.platform members -, autoModules ? stdenv.hostPlatform.platform.kernelAutoModules -, preferBuiltin ? stdenv.hostPlatform.platform.kernelPreferBuiltin or false -, kernelArch ? stdenv.hostPlatform.platform.kernelArch +# easy overrides to stdenv.hostPlatform.linux-kernel members +, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules +, preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false +, kernelArch ? stdenv.hostPlatform.linuxArch , ... }: @@ -87,7 +87,7 @@ let intermediateNixConfig = configfile.moduleStructuredConfig.intermediateNixConfig # extra config in legacy string format + extraConfig - + lib.optionalString (stdenv.hostPlatform.platform ? kernelExtraConfig) stdenv.hostPlatform.platform.kernelExtraConfig; + + stdenv.hostPlatform.linux-kernel.extraConfig or ""; structuredConfigFromPatches = map ({extraStructuredConfig ? {}, ...}: {settings=extraStructuredConfig;}) kernelPatches; @@ -113,11 +113,11 @@ let nativeBuildInputs = [ perl gmp libmpc mpfr ] ++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ]; - platformName = stdenv.hostPlatform.platform.name; + platformName = stdenv.hostPlatform.linux-kernel.name; # e.g. "defconfig" - kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.platform.kernelBaseConfig; + kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig; # e.g. "bzImage" - kernelTarget = stdenv.hostPlatform.platform.kernelTarget; + kernelTarget = stdenv.hostPlatform.linux-kernel.target; prePatch = kernel.prePatch + '' # Patch kconfig to print "###" after every question so that diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 67016b71918..2fc63322f5b 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -64,10 +64,10 @@ let commonMakeFlags = [ "O=$(buildRoot)" - ] ++ lib.optionals (stdenv.hostPlatform.platform ? kernelMakeFlags) - stdenv.hostPlatform.platform.kernelMakeFlags; + ] ++ lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) + stdenv.hostPlatform.linux-kernel.makeFlags; - drvAttrs = config_: platform: kernelPatches: configfile: + drvAttrs = config_: kernelConf: kernelPatches: configfile: let config = let attrName = attr: "CONFIG_" + attr; in { isSet = attr: hasAttr (attrName attr) config; @@ -171,7 +171,7 @@ let buildFlags = [ "KBUILD_BUILD_VERSION=1-NixOS" - platform.kernelTarget + kernelConf.target "vmlinux" # for "perf" and things like that ] ++ optional isModular "modules"; @@ -186,16 +186,16 @@ let ''; # Some image types need special install targets (e.g. uImage is installed with make uinstall) - installTargets = [ ( - if platform ? kernelInstallTarget then platform.kernelInstallTarget - else if platform.kernelTarget == "uImage" then "uinstall" - else if platform.kernelTarget == "zImage" || platform.kernelTarget == "Image.gz" then "zinstall" - else "install" - ) ]; + installTargets = [ + (kernelConf.installTarget or ( + /**/ if kernelConf.target == "uImage" then "uinstall" + else if kernelConf.target == "zImage" || kernelConf.target == "Image.gz" then "zinstall" + else "install")) + ]; postInstall = (optionalString installsFirmware '' mkdir -p $out/lib/firmware - '') + (if (platform ? kernelDTB && platform.kernelDTB) then '' + '') + (if (kernelConf.DTB or false) then '' make $makeFlags "''${makeFlagsArray[@]}" dtbs dtbs_install INSTALL_DTBS_PATH=$out/dtbs '' else "") + (if isModular then '' mkdir -p $dev @@ -300,7 +300,7 @@ in assert (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") -> libelf != null; assert lib.versionAtLeast version "5.8" -> elfutils != null; -stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { +stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPatches configfile) // { pname = "linux"; inherit version; @@ -308,7 +308,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr gawk zstd ] - ++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools + ++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools ++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf # Removed util-linuxMinimal since it should not be a dependency. ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ] @@ -322,10 +322,10 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches makeFlags = commonMakeFlags ++ [ "CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" "HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc" - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" + "ARCH=${stdenv.hostPlatform.linuxArch}" ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; - karch = stdenv.hostPlatform.platform.kernelArch; + karch = stdenv.hostPlatform.linuxArch; }) diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 65ab71bd562..dc96f3b6a62 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" "stackprotector" ]; makeFlags = commonMakeFlags ++ [ - "KLIBCARCH=${stdenv.hostPlatform.platform.kernelArch}" + "KLIBCARCH=${stdenv.hostPlatform.linuxArch}" "KLIBCKERNELSRC=${linuxHeaders}" ] # TODO(@Ericson2314): We now can get the ABI from # `stdenv.hostPlatform.parsed.abi`, is this still a good idea? - ++ lib.optional (stdenv.hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" + ++ lib.optional (stdenv.hostPlatform.linuxArch == "arm") "CONFIG_AEABI=y" ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; # Install static binaries as well. diff --git a/pkgs/os-specific/linux/rtl8723bs/default.nix b/pkgs/os-specific/linux/rtl8723bs/default.nix index 056fd40d252..a862b351716 100644 --- a/pkgs/os-specific/linux/rtl8723bs/default.nix +++ b/pkgs/os-specific/linux/rtl8723bs/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ nukeReferences ]; makeFlags = [ - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" # Normally not needed, but the Makefile sets ARCH in a broken way. + "ARCH=${stdenv.hostPlatform.linuxArch}" # Normally not needed, but the Makefile sets ARCH in a broken way. "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" # Makefile uses $(uname -r); breaks us. ]; diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index aeed87d3c19..68a88fb6778 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ''; makeFlags = [ - "ARCH=${stdenv.hostPlatform.platform.kernelArch}" + "ARCH=${stdenv.hostPlatform.linuxArch}" "KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n")) ("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n")) diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix index 7c95a98372d..7508e1faf15 100644 --- a/pkgs/os-specific/linux/uclibc/default.nix +++ b/pkgs/os-specific/linux/uclibc/default.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation { cat << EOF | parseconfig ${nixConfig} ${extraConfig} - ${stdenv.hostPlatform.platform.uclibc.extraConfig or ""} + ${stdenv.hostPlatform.uclibc.extraConfig or ""} EOF ( set +o pipefail; yes "" | make oldconfig ) ''; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 0eb799e4525..28d22a4bb47 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -278,8 +278,8 @@ in rec { enableParallelChecking = attrs.enableParallelChecking or true; } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) { NIX_HARDENING_ENABLE = enabledHardeningOptions; - } // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? platform.gcc.arch) { - requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.platform.gcc.arch}" ]; + } // lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform ? gcc.arch) { + requiredSystemFeatures = attrs.requiredSystemFeatures or [] ++ [ "gccarch-${stdenv.hostPlatform.gcc.arch}" ]; } // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) { inherit __darwinAllowLocalNetworking; # TODO: remove lib.unique once nix has a list canonicalization primitive diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd86fed4cb2..ed9f3047969 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19291,7 +19291,7 @@ in buildPhase = '' set -x make \ - ARCH=${stdenv.hostPlatform.kernelArch} \ + ARCH=${stdenv.hostPlatform.linuxArch} \ HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \ ${makeTarget} ''; -- cgit 1.4.1 From 7a87973b4ced86e1ba94ee84449979d6afebc9ea Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sun, 7 Mar 2021 14:54:00 +0100 Subject: nixos/users: require one of users.users.name.{isSystemUser,isNormalUser} As the only consequence of isSystemUser is that if the uid is null then it's allocated below 500, if a user has uid = something below 500 then we don't require isSystemUser to be set. Motivation: https://github.com/NixOS/nixpkgs/issues/112647 --- nixos/doc/manual/development/settings-options.xml | 2 +- nixos/doc/manual/release-notes/rl-2105.xml | 7 +++++ nixos/modules/config/pulseaudio.nix | 1 + nixos/modules/config/users-groups.nix | 34 +++++++++++++++++------ nixos/modules/services/backup/borgbackup.nix | 1 + nixos/modules/services/databases/pgmanage.nix | 1 + nixos/modules/services/misc/bazarr.nix | 1 + nixos/modules/services/misc/nix-daemon.nix | 1 + nixos/modules/services/monitoring/tuptime.nix | 5 +++- nixos/modules/services/networking/bird.nix | 1 + nixos/modules/services/networking/ncdns.nix | 6 ++-- nixos/modules/services/networking/pixiecore.nix | 1 + nixos/modules/services/networking/pleroma.nix | 1 + nixos/modules/services/security/privacyidea.nix | 2 ++ nixos/modules/services/web-apps/nextcloud.nix | 1 + nixos/tests/mysql/mariadb-galera-mariabackup.nix | 6 ++-- nixos/tests/mysql/mariadb-galera-rsync.nix | 6 ++-- nixos/tests/mysql/mysql.nix | 12 ++++---- nixos/tests/redis.nix | 3 +- nixos/tests/rspamd.nix | 5 +++- nixos/tests/shadow.nix | 3 ++ nixos/tests/systemd-confinement.nix | 1 + nixos/tests/unbound.nix | 11 +++++--- 23 files changed, 80 insertions(+), 32 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/doc/manual/development/settings-options.xml b/nixos/doc/manual/development/settings-options.xml index c99c3af92f8..7795d7c8044 100644 --- a/nixos/doc/manual/development/settings-options.xml +++ b/nixos/doc/manual/development/settings-options.xml @@ -167,7 +167,7 @@ in { # We know that the `user` attribute exists because we set a default value # for it above, allowing us to use it without worries here - users.users.${cfg.settings.user} = {}; + users.users.${cfg.settings.user} = { isSystemUser = true; }; # ... }; diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index cf9e0609723..723f928ec35 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -839,6 +839,13 @@ environment.systemPackages = [ The option's description was incorrect regarding ownership management and has been simplified greatly. + + + When defining a new user, one of and is now required. + This is to prevent accidentally giving a UID above 1000 to system users, which could have unexpected consequences, like running user activation scripts for system users. + Note that users defined with an explicit UID below 500 are exempted from this check, as has no effect for those. + + The GNOME desktop manager once again installs gnome3.epiphany by default. diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index c0e90a8c26e..0266bbfb121 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -306,6 +306,7 @@ in { description = "PulseAudio system service user"; home = stateDir; createHome = true; + isSystemUser = true; }; users.groups.pulse.gid = gid; diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 4a2647339c5..2b6a61e9a80 100644 --- a/nixos/modules/config/users-groups.nix +++ b/nixos/modules/config/users-groups.nix @@ -92,6 +92,8 @@ let the user's UID is allocated in the range for system users (below 500) or in the range for normal users (starting at 1000). + Exactly one of isNormalUser and + isSystemUser must be true. ''; }; @@ -107,6 +109,8 @@ let to true, and to false. + Exactly one of isNormalUser and + isSystemUser must be true. ''; }; @@ -521,6 +525,7 @@ in { }; nobody = { uid = ids.uids.nobody; + isSystemUser = true; description = "Unprivileged account (don't use!)"; group = "nogroup"; }; @@ -608,17 +613,28 @@ in { Neither the root account nor any wheel user has a password or SSH authorized key. You must set one to prevent being locked out of your system.''; } - ] ++ flip mapAttrsToList cfg.users (name: user: - { + ] ++ flatten (flip mapAttrsToList cfg.users (name: user: + [ + { assertion = (user.hashedPassword != null) - -> (builtins.match ".*:.*" user.hashedPassword == null); + -> (builtins.match ".*:.*" user.hashedPassword == null); message = '' - The password hash of user "${user.name}" contains a ":" character. - This is invalid and would break the login system because the fields - of /etc/shadow (file where hashes are stored) are colon-separated. - Please check the value of option `users.users."${user.name}".hashedPassword`.''; - } - ); + The password hash of user "${user.name}" contains a ":" character. + This is invalid and would break the login system because the fields + of /etc/shadow (file where hashes are stored) are colon-separated. + Please check the value of option `users.users."${user.name}".hashedPassword`.''; + } + { + assertion = let + xor = a: b: a && !b || b && !a; + isEffectivelySystemUser = user.isSystemUser || (user.uid != null && user.uid < 500); + in xor isEffectivelySystemUser user.isNormalUser; + message = '' + Exactly one of users.users.${user.name}.isSystemUser and users.users.${user.name}.isNormalUser must be set. + ''; + } + ] + )); warnings = builtins.filter (x: x != null) ( diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix index be661b201f0..18fb29fd72a 100644 --- a/nixos/modules/services/backup/borgbackup.nix +++ b/nixos/modules/services/backup/borgbackup.nix @@ -169,6 +169,7 @@ let (map (mkAuthorizedKey cfg false) cfg.authorizedKeys ++ map (mkAuthorizedKey cfg true) cfg.authorizedKeysAppendOnly); useDefaultShell = true; + isSystemUser = true; }; groups.${cfg.group} = { }; }; diff --git a/nixos/modules/services/databases/pgmanage.nix b/nixos/modules/services/databases/pgmanage.nix index 0f8634dab31..8508e76b5cd 100644 --- a/nixos/modules/services/databases/pgmanage.nix +++ b/nixos/modules/services/databases/pgmanage.nix @@ -197,6 +197,7 @@ in { group = pgmanage; home = cfg.sqlRoot; createHome = true; + isSystemUser = true; }; groups.${pgmanage} = { name = pgmanage; diff --git a/nixos/modules/services/misc/bazarr.nix b/nixos/modules/services/misc/bazarr.nix index d3fd5b08cc8..99343a146a7 100644 --- a/nixos/modules/services/misc/bazarr.nix +++ b/nixos/modules/services/misc/bazarr.nix @@ -64,6 +64,7 @@ in users.users = mkIf (cfg.user == "bazarr") { bazarr = { + isSystemUser = true; group = cfg.group; home = "/var/lib/${config.systemd.services.bazarr.serviceConfig.StateDirectory}"; }; diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 64bdbf159d5..133e96da0ec 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -21,6 +21,7 @@ let calls in `libstore/build.cc', don't add any supplementary group here except "nixbld". */ uid = builtins.add config.ids.uids.nixbld nr; + isSystemUser = true; group = "nixbld"; extraGroups = [ "nixbld" ]; }; diff --git a/nixos/modules/services/monitoring/tuptime.nix b/nixos/modules/services/monitoring/tuptime.nix index 8f79d916599..17c5c1f56ea 100644 --- a/nixos/modules/services/monitoring/tuptime.nix +++ b/nixos/modules/services/monitoring/tuptime.nix @@ -34,7 +34,10 @@ in { users = { groups._tuptime.members = [ "_tuptime" ]; - users._tuptime.description = "tuptime database owner"; + users._tuptime = { + isSystemUser = true; + description = "tuptime database owner"; + }; }; systemd = { diff --git a/nixos/modules/services/networking/bird.nix b/nixos/modules/services/networking/bird.nix index 6d7e7760d94..1923afdf83f 100644 --- a/nixos/modules/services/networking/bird.nix +++ b/nixos/modules/services/networking/bird.nix @@ -73,6 +73,7 @@ let users.${variant} = { description = "BIRD Internet Routing Daemon user"; group = variant; + isSystemUser = true; }; groups.${variant} = {}; }; diff --git a/nixos/modules/services/networking/ncdns.nix b/nixos/modules/services/networking/ncdns.nix index c1832ad1752..d30fe0f6f6d 100644 --- a/nixos/modules/services/networking/ncdns.nix +++ b/nixos/modules/services/networking/ncdns.nix @@ -243,8 +243,10 @@ in xlog.journal = true; }; - users.users.ncdns = - { description = "ncdns daemon user"; }; + users.users.ncdns = { + isSystemUser = true; + description = "ncdns daemon user"; + }; systemd.services.ncdns = { description = "ncdns daemon"; diff --git a/nixos/modules/services/networking/pixiecore.nix b/nixos/modules/services/networking/pixiecore.nix index 85aa40784af..d2642c82c2d 100644 --- a/nixos/modules/services/networking/pixiecore.nix +++ b/nixos/modules/services/networking/pixiecore.nix @@ -93,6 +93,7 @@ in users.users.pixiecore = { description = "Pixiecore daemon user"; group = "pixiecore"; + isSystemUser = true; }; networking.firewall = mkIf cfg.openFirewall { diff --git a/nixos/modules/services/networking/pleroma.nix b/nixos/modules/services/networking/pleroma.nix index 9b2bf9f6124..2687230a158 100644 --- a/nixos/modules/services/networking/pleroma.nix +++ b/nixos/modules/services/networking/pleroma.nix @@ -75,6 +75,7 @@ in { description = "Pleroma user"; home = cfg.stateDir; extraGroups = [ cfg.group ]; + isSystemUser = true; }; groups."${cfg.group}" = {}; }; diff --git a/nixos/modules/services/security/privacyidea.nix b/nixos/modules/services/security/privacyidea.nix index f7b40089a93..2696dca4c76 100644 --- a/nixos/modules/services/security/privacyidea.nix +++ b/nixos/modules/services/security/privacyidea.nix @@ -264,6 +264,7 @@ in users.users.privacyidea = mkIf (cfg.user == "privacyidea") { group = cfg.group; + isSystemUser = true; }; users.groups.privacyidea = mkIf (cfg.group == "privacyidea") {}; @@ -294,6 +295,7 @@ in users.users.pi-ldap-proxy = mkIf (cfg.ldap-proxy.user == "pi-ldap-proxy") { group = cfg.ldap-proxy.group; + isSystemUser = true; }; users.groups.pi-ldap-proxy = mkIf (cfg.ldap-proxy.group == "pi-ldap-proxy") {}; diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index 9a541aba6e4..58e8e5a0a8b 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -607,6 +607,7 @@ in { home = "${cfg.home}"; group = "nextcloud"; createHome = true; + isSystemUser = true; }; users.groups.nextcloud.members = [ "nextcloud" config.services.nginx.user ]; diff --git a/nixos/tests/mysql/mariadb-galera-mariabackup.nix b/nixos/tests/mysql/mariadb-galera-mariabackup.nix index 0a40c010a47..1c73bc854a5 100644 --- a/nixos/tests/mysql/mariadb-galera-mariabackup.nix +++ b/nixos/tests/mysql/mariadb-galera-mariabackup.nix @@ -31,7 +31,7 @@ in { firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ]; firewall.allowedUDPPorts = [ 4567 ]; }; - users.users.testuser = { }; + users.users.testuser = { isSystemUser = true; }; systemd.services.mysql = with pkgs; { path = [ mysqlenv-common mysqlenv-mariabackup ]; }; @@ -89,7 +89,7 @@ in { firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ]; firewall.allowedUDPPorts = [ 4567 ]; }; - users.users.testuser = { }; + users.users.testuser = { isSystemUser = true; }; systemd.services.mysql = with pkgs; { path = [ mysqlenv-common mysqlenv-mariabackup ]; }; @@ -136,7 +136,7 @@ in { firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ]; firewall.allowedUDPPorts = [ 4567 ]; }; - users.users.testuser = { }; + users.users.testuser = { isSystemUser = true; }; systemd.services.mysql = with pkgs; { path = [ mysqlenv-common mysqlenv-mariabackup ]; }; diff --git a/nixos/tests/mysql/mariadb-galera-rsync.nix b/nixos/tests/mysql/mariadb-galera-rsync.nix index 6fb3cfef8d7..709a8b5085c 100644 --- a/nixos/tests/mysql/mariadb-galera-rsync.nix +++ b/nixos/tests/mysql/mariadb-galera-rsync.nix @@ -31,7 +31,7 @@ in { firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ]; firewall.allowedUDPPorts = [ 4567 ]; }; - users.users.testuser = { }; + users.users.testuser = { isSystemUser = true; }; systemd.services.mysql = with pkgs; { path = [ mysqlenv-common mysqlenv-rsync ]; }; @@ -84,7 +84,7 @@ in { firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ]; firewall.allowedUDPPorts = [ 4567 ]; }; - users.users.testuser = { }; + users.users.testuser = { isSystemUser = true; }; systemd.services.mysql = with pkgs; { path = [ mysqlenv-common mysqlenv-rsync ]; }; @@ -130,7 +130,7 @@ in { firewall.allowedTCPPorts = [ 3306 4444 4567 4568 ]; firewall.allowedUDPPorts = [ 4567 ]; }; - users.users.testuser = { }; + users.users.testuser = { isSystemUser = true; }; systemd.services.mysql = with pkgs; { path = [ mysqlenv-common mysqlenv-rsync ]; }; diff --git a/nixos/tests/mysql/mysql.nix b/nixos/tests/mysql/mysql.nix index 50ad5c68aef..c21136416d4 100644 --- a/nixos/tests/mysql/mysql.nix +++ b/nixos/tests/mysql/mysql.nix @@ -9,8 +9,8 @@ import ./../make-test-python.nix ({ pkgs, ...} : { { pkgs, ... }: { - users.users.testuser = { }; - users.users.testuser2 = { }; + users.users.testuser = { isSystemUser = true; }; + users.users.testuser2 = { isSystemUser = true; }; services.mysql.enable = true; services.mysql.initialDatabases = [ { name = "testdb3"; schema = ./testdb.sql; } @@ -44,8 +44,8 @@ import ./../make-test-python.nix ({ pkgs, ...} : { # Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled virtualisation.memorySize = 1024; - users.users.testuser = { }; - users.users.testuser2 = { }; + users.users.testuser = { isSystemUser = true; }; + users.users.testuser2 = { isSystemUser = true; }; services.mysql.enable = true; services.mysql.initialDatabases = [ { name = "testdb3"; schema = ./testdb.sql; } @@ -75,8 +75,8 @@ import ./../make-test-python.nix ({ pkgs, ...} : { { pkgs, ... }: { - users.users.testuser = { }; - users.users.testuser2 = { }; + users.users.testuser = { isSystemUser = true; }; + users.users.testuser2 = { isSystemUser = true; }; services.mysql.enable = true; services.mysql.initialScript = pkgs.writeText "mariadb-init.sql" '' ALTER USER root@localhost IDENTIFIED WITH unix_socket; diff --git a/nixos/tests/redis.nix b/nixos/tests/redis.nix index 79a7847414a..28b6058c2c0 100644 --- a/nixos/tests/redis.nix +++ b/nixos/tests/redis.nix @@ -22,11 +22,10 @@ in users.users."member" = { createHome = false; description = "A member of the redis group"; + isNormalUser = true; extraGroups = [ "redis" ]; - group = "users"; - shell = "/bin/sh"; }; }; }; diff --git a/nixos/tests/rspamd.nix b/nixos/tests/rspamd.nix index 7f41e1a7956..f0ccfe7ea0e 100644 --- a/nixos/tests/rspamd.nix +++ b/nixos/tests/rspamd.nix @@ -274,7 +274,10 @@ in I find cows to be evil don't you? ''; - users.users.tester.password = "test"; + users.users.tester = { + isNormalUser = true; + password = "test"; + }; services.postfix = { enable = true; destination = ["example.com"]; diff --git a/nixos/tests/shadow.nix b/nixos/tests/shadow.nix index e5755e8e087..c51961e1fc6 100644 --- a/nixos/tests/shadow.nix +++ b/nixos/tests/shadow.nix @@ -13,14 +13,17 @@ in import ./make-test-python.nix ({ pkgs, ... }: { users = { mutableUsers = true; users.emma = { + isNormalUser = true; password = password1; shell = pkgs.bash; }; users.layla = { + isNormalUser = true; password = password2; shell = pkgs.shadow; }; users.ash = { + isNormalUser = true; password = password4; shell = pkgs.bash; }; diff --git a/nixos/tests/systemd-confinement.nix b/nixos/tests/systemd-confinement.nix index ebf6d218fd6..d04e4a3f867 100644 --- a/nixos/tests/systemd-confinement.nix +++ b/nixos/tests/systemd-confinement.nix @@ -150,6 +150,7 @@ import ./make-test-python.nix { config.users.groups.chroot-testgroup = {}; config.users.users.chroot-testuser = { + isSystemUser = true; description = "Chroot Test User"; group = "chroot-testgroup"; }; diff --git a/nixos/tests/unbound.nix b/nixos/tests/unbound.nix index d4b8bb15ced..ca9718ac633 100644 --- a/nixos/tests/unbound.nix +++ b/nixos/tests/unbound.nix @@ -132,12 +132,15 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: users.users = { # user that is permitted to access the unix socket - someuser.extraGroups = [ - config.users.users.unbound.group - ]; + someuser = { + isSystemUser = true; + extraGroups = [ + config.users.users.unbound.group + ]; + }; # user that is not permitted to access the unix socket - unauthorizeduser = {}; + unauthorizeduser = { isSystemUser = true; }; }; environment.etc = { -- cgit 1.4.1 From aeeee447bcc181d57a19d348f857326f4e1959fe Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 8 Nov 2020 09:40:27 +0300 Subject: nixos/nix-daemon: fix sandbox-paths option In newer versions of Nix (at least on 2.4pre20201102_550e11f) the `extra-` prefix for config options received a special meaning and the option `extra-sandbox-paths` isn't recognized anymore. This commit fixes it. It doesn't cause a behavior change when using older versions of Nix but does cause an extra newline to appear in the config, thus changing the hash. --- nixos/modules/services/misc/nix-daemon.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 133e96da0ec..df745fa7168 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -12,6 +12,8 @@ let isNix23 = versionAtLeast nixVersion "2.3pre"; + isNix24 = versionAtLeast nixVersion "2.4pre"; + makeNixBuildUser = nr: { name = "nixbld${toString nr}"; value = { @@ -41,7 +43,11 @@ let max-jobs = ${toString (cfg.maxJobs)} cores = ${toString (cfg.buildCores)} sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox} - extra-sandbox-paths = ${toString cfg.sandboxPaths} + ${if isNix24 then '' + sandbox-paths = ${toString cfg.sandboxPaths} + '' else '' + extra-sandbox-paths = ${toString cfg.sandboxPaths} + ''} substituters = ${toString cfg.binaryCaches} trusted-substituters = ${toString cfg.trustedBinaryCaches} trusted-public-keys = ${toString cfg.binaryCachePublicKeys} -- cgit 1.4.1 From 113823669b9b71fff84bc592d1fd6022635c28eb Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 24 May 2021 10:51:02 +0200 Subject: Revert "nixos/nix-daemon: fix sandbox-paths option" This reverts commit aeeee447bcc181d57a19d348f857326f4e1959fe. --- nixos/modules/services/misc/nix-daemon.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'nixos/modules/services/misc/nix-daemon.nix') diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index df745fa7168..133e96da0ec 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -12,8 +12,6 @@ let isNix23 = versionAtLeast nixVersion "2.3pre"; - isNix24 = versionAtLeast nixVersion "2.4pre"; - makeNixBuildUser = nr: { name = "nixbld${toString nr}"; value = { @@ -43,11 +41,7 @@ let max-jobs = ${toString (cfg.maxJobs)} cores = ${toString (cfg.buildCores)} sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox} - ${if isNix24 then '' - sandbox-paths = ${toString cfg.sandboxPaths} - '' else '' - extra-sandbox-paths = ${toString cfg.sandboxPaths} - ''} + extra-sandbox-paths = ${toString cfg.sandboxPaths} substituters = ${toString cfg.binaryCaches} trusted-substituters = ${toString cfg.trustedBinaryCaches} trusted-public-keys = ${toString cfg.binaryCachePublicKeys} -- cgit 1.4.1