about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific')
-rw-r--r--nixpkgs/pkgs/os-specific/darwin/yabai/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/cshatag/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ell/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/fan2go/default.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ipp-usb/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iproute/default.nix7
-rw-r--r--nixpkgs/pkgs/os-specific/linux/iwd/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kbd/default.nix14
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix5
-rw-r--r--nixpkgs/pkgs/os-specific/linux/kernel/xanmod-kernels.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/default.nix24
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/common.nix11
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/default.nix59
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/mes.nix70
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix1
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/musl/default.nix87
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix8
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix28
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/default.nix3
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix6
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-boot.nix (renamed from nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix)167
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/default.nix10
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem100
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/default.nix42
-rw-r--r--nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix29
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix12
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix47
-rw-r--r--nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix63
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pam_ussh/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/pflask/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/psmisc/default.nix23
-rw-r--r--nixpkgs/pkgs/os-specific/linux/uclibc-ng/default.nix4
-rw-r--r--nixpkgs/pkgs/os-specific/linux/ultrablue-server/default.nix2
-rw-r--r--nixpkgs/pkgs/os-specific/linux/util-linux/default.nix14
42 files changed, 631 insertions, 272 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix b/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix
index 66f78da85d6f..14d3ccbc0469 100644
--- a/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix
+++ b/nixpkgs/pkgs/os-specific/darwin/yabai/default.nix
@@ -17,7 +17,7 @@
 
 let
   pname = "yabai";
-  version = "5.0.7";
+  version = "5.0.8";
 
   test-version = testers.testVersion {
     package = yabai;
@@ -53,7 +53,7 @@ in
 
     src = fetchzip {
       url = "https://github.com/koekeishiya/yabai/releases/download/v${version}/yabai-v${version}.tar.gz";
-      hash = "sha256-6RtA3xFOVwTYrfHE72Qa65kDSwv/3/NQ8z4bVCsm9Fc=";
+      hash = "sha256-w4MTHHYWwBq0/WkemYIeV49aA/DzFxXITD8gF5St0Yo=";
     };
 
     nativeBuildInputs = [
@@ -89,7 +89,7 @@ in
       owner = "koekeishiya";
       repo = "yabai";
       rev = "v${version}";
-      hash = "sha256-wFrMMiy+K+bnEeVyY3RGVZBoxiKQ69Q+Bp1xa+IcWas=";
+      hash = "sha256-VahfeKYz/cATb0RF9QykngMtRpCh392jY8aJuggpqMU=";
     };
 
     nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix b/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
index 5e9e6eca2694..fbff9a3363de 100644
--- a/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cryptsetup/default.nix
@@ -2,6 +2,9 @@
 , openssl, libuuid, pkg-config, popt, nixosTests
 , libargon2, withInternalArgon2 ? false
 
+  # Programs enabled by default upstream are implicitly enabled unless
+  # manually set to false.
+, programs ? {}
   # The release tarballs contain precomputed manpage files, so we don't need
   # to run asciidoctor on the man sources. By avoiding asciidoctor, we make
   # the bare NixOS build hash independent of changes to the ruby ecosystem,
@@ -50,7 +53,7 @@ stdenv.mkDerivation rec {
     # support, because the path still gets included in the binary even
     # though it isn't used.
     "--with-luks2-external-tokens-path=/"
-  ];
+  ] ++ (with lib; mapAttrsToList (flip enableFeature)) programs;
 
   nativeBuildInputs = [ pkg-config ] ++ lib.optionals rebuildMan [ asciidoctor ];
   buildInputs = [ lvm2 json_c openssl libuuid popt ] ++ lib.optional (!withInternalArgon2) libargon2;
diff --git a/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix b/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix
index 64fb6f4f88ff..84de0c5dd11d 100644
--- a/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/cshatag/default.nix
@@ -11,7 +11,7 @@ buildGoModule rec {
     sha256 = "sha256-Ez8zGVX10A7xuggkh3n7w/qzda8f4t6EgSc9l6SPEZQ=";
   };
 
-  vendorSha256 = "sha256-QTnwltsoyUbH4vob5go1KBrb9gwxaaPNW3S4sxVls3k=";
+  vendorHash = "sha256-QTnwltsoyUbH4vob5go1KBrb9gwxaaPNW3S4sxVls3k=";
 
   ldflags = [ "-s" "-w" ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/ell/default.nix b/nixpkgs/pkgs/os-specific/linux/ell/default.nix
index bde39a41b525..230f73ef416d 100644
--- a/nixpkgs/pkgs/os-specific/linux/ell/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ell/default.nix
@@ -40,6 +40,6 @@ stdenv.mkDerivation rec {
     changelog = "https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ChangeLog?h=${version}";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ mic92 dtzWill maxeaubrey ];
+    maintainers = with maintainers; [ mic92 dtzWill amaxine ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix b/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix
index e7ad27741062..48da98cf5912 100644
--- a/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/fan2go/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "fan2go";
-  version = "0.8.0";
+  version = "0.8.1";
 
   src = fetchFromGitHub {
     owner = "markusressel";
     repo = pname;
     rev = version;
-    sha256 = "3pnJaLD+FEQWAAwIiTkcs9VgqO0JwRaK7JLdIygeChY=";
+    sha256 = "w2Qwu3ZmBkoA86xa7V6pnIBAbfG9mtkAHePkQjefRW8=";
   };
 
-  vendorSha256 = "9EeiYPNTUEFHxTdvVb2JLU6Qi0oazH+n9MB8Dg+RLJ4=";
+  vendorSha256 = "6OEdl7ie0dTjXrG//Fvcg4ZyTW/mhrUievDljY2zi/4=";
 
   postConfigure = ''
     substituteInPlace vendor/github.com/md14454/gosensors/gosensors.go \
diff --git a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
index 56001cb225aa..a8adefc63468 100644
--- a/nixpkgs/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     homepage = "https://fwupd.org/";
-    maintainers = with maintainers; [ maxeaubrey ];
+    maintainers = with maintainers; [ amaxine ];
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
   };
diff --git a/nixpkgs/pkgs/os-specific/linux/ipp-usb/default.nix b/nixpkgs/pkgs/os-specific/linux/ipp-usb/default.nix
index 0e79b89cfa34..6dc63a7295b1 100644
--- a/nixpkgs/pkgs/os-specific/linux/ipp-usb/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ipp-usb/default.nix
@@ -24,7 +24,7 @@ buildGoModule rec {
   nativeBuildInputs = [ pkg-config ronn ];
   buildInputs = [ libusb1 avahi ];
 
-  vendorSha256 = "sha256-KwW6KgopjF4tVo8eB4OtpXF5R8jfrJ9nibNmaN8U4l8=";
+  vendorHash = "sha256-KwW6KgopjF4tVo8eB4OtpXF5R8jfrJ9nibNmaN8U4l8=";
 
   postInstall = ''
     # to accomodate the makefile
diff --git a/nixpkgs/pkgs/os-specific/linux/iproute/default.nix b/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
index 83ff3fd4cc3b..64749e209ba6 100644
--- a/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iproute/default.nix
@@ -27,9 +27,12 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  preConfigure = ''
+  postPatch = ''
     # Don't try to create /var/lib/arpd:
     sed -e '/ARPDDIR/d' -i Makefile
+
+    substituteInPlace Makefile \
+      --replace "CC := gcc" "CC ?= $CC"
   '';
 
   outputs = [ "out" "dev" ];
@@ -43,6 +46,8 @@ stdenv.mkDerivation rec {
     "SHARED_LIBS=n"
     # all build .so plugins:
     "TC_CONFIG_NO_XT=y"
+  ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "HOSTCC=$(CC_FOR_BUILD)"
   ];
 
   buildFlags = [
diff --git a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
index b808fb208c4d..792fef69cbd2 100644
--- a/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/iwd/default.nix
@@ -92,6 +92,6 @@ stdenv.mkDerivation rec {
     description = "Wireless daemon for Linux";
     license = licenses.lgpl21Plus;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ dtzWill fpletz maxeaubrey ];
+    maintainers = with maintainers; [ dtzWill fpletz amaxine ];
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/kbd/default.nix b/nixpkgs/pkgs/os-specific/linux/kbd/default.nix
index c19646ac529a..1c38f4b7f491 100644
--- a/nixpkgs/pkgs/os-specific/linux/kbd/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kbd/default.nix
@@ -12,15 +12,16 @@
 , bzip2
 , xz
 , zstd
+, gitUpdater
 }:
 
 stdenv.mkDerivation rec {
   pname = "kbd";
-  version = "2.6.1";
+  version = "2.6.2";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/kbd/${pname}-${version}.tar.xz";
-    sha256 = "sha256-LrbGyXK+lYm6tzMnW/AgvrX2RNX5Q5c3kg5wGvbPNIU=";
+    sha256 = "sha256-M+O7PD9VkzsQ8FOxS19pouJMKFQ+nsdpAkb+R2KN2U8=";
   };
 
   # vlock is moved into its own output, since it depends on pam. This
@@ -79,7 +80,14 @@ stdenv.mkDerivation rec {
   passthru.tests = {
     inherit (nixosTests) keymap kbd-setfont-decompress kbd-update-search-paths-patch;
   };
-  passthru.gzip = gzip;
+  passthru = {
+    gzip = gzip;
+    updateScript = gitUpdater {
+       # No nicer place to find latest release.
+       url = "https://github.com/legionus/kbd.git";
+       rev-prefix = "v";
+    };
+  };
 
   meta = with lib; {
     homepage = "https://kbd-project.org/";
diff --git a/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch b/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch
index 3b337ca7cc2b..fad33be45bdc 100644
--- a/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch
+++ b/nixpkgs/pkgs/os-specific/linux/kbd/search-paths.patch
@@ -52,10 +52,9 @@ Without this patch, kbd will only look inside
  };
 --- a/src/loadkeys.c
 +++ b/src/loadkeys.c
-@@ -27,6 +27,7 @@
+@@ -27,5 +27,6 @@
  
  static const char *const dirpath1[] = {
- 	"",
 +	"/etc/kbd/" KEYMAPDIR "/**",
  	DATADIR "/" KEYMAPDIR "/**",
  	KERNDIR "/",
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix b/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
index c8ae911c1287..2e5582677369 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/common-config.nix
@@ -603,8 +603,8 @@ let
 
     microcode = {
       MICROCODE       = yes;
-      MICROCODE_INTEL = yes;
-      MICROCODE_AMD   = yes;
+      MICROCODE_INTEL = whenOlder "6.6" yes;
+      MICROCODE_AMD   = whenOlder "6.6" yes;
       # Write Back Throttling
       # https://lwn.net/Articles/682582/
       # https://bugzilla.kernel.org/show_bug.cgi?id=12309#c655
@@ -913,7 +913,7 @@ let
       SECCOMP             = yes; # used by systemd >= 231
       SECCOMP_FILTER      = yes; # ditto
       POSIX_MQUEUE        = yes;
-      FRONTSWAP           = yes;
+      FRONTSWAP           = whenOlder "6.6" yes;
       FUSION              = yes; # Fusion MPT device support
       IDE                 = whenOlder "5.14" no; # deprecated IDE support, removed in 5.14
       IDLE_PAGE_TRACKING  = yes;
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix
index 1f03029d9028..9a3b32a7f2d2 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/linux-testing.nix
@@ -3,7 +3,7 @@
 with lib;
 
 buildLinux (args // rec {
-  version = "6.5-rc7";
+  version = "6.6-rc1";
   extraMeta.branch = lib.versions.majorMinor version;
 
   # modDirVersion needs to be x.y.z, will always add .0
@@ -11,7 +11,7 @@ buildLinux (args // rec {
 
   src = fetchzip {
     url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
-    hash = "sha256-5rIcyXN54o9P+RxHZkI/BTO2Ox6uJ0Fi9NVcrN1HczQ=";
+    hash = "sha256-DRai7HhWVtRB0GiRCvCv2JM2TFKRsZ60ohD6GW0b8As=";
   };
 
   # Should the testing kernels ever be built on Hydra?
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix b/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
index 8dd92c99db4a..7c3084d7ebdb 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
-, libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole
+, libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole, kmod
 , fetchpatch
 }:
 
@@ -271,7 +271,7 @@ let
         make modules_install $makeFlags "''${makeFlagsArray[@]}" \
           $installFlags "''${installFlagsArray[@]}"
         unlink $out/lib/modules/${modDirVersion}/build
-        unlink $out/lib/modules/${modDirVersion}/source
+        rm -f $out/lib/modules/${modDirVersion}/source
 
         mkdir -p $dev/lib/modules/${modDirVersion}/{build,source}
 
@@ -376,6 +376,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPat
       ++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
       ++ optionals (lib.versionAtLeast version "5.2")  [ cpio pahole zlib ]
       ++ optional  (lib.versionAtLeast version "5.8")  elfutils
+      ++ optional  (lib.versionAtLeast version "6.6")  kmod
       ;
 
   hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];
diff --git a/nixpkgs/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/nixpkgs/pkgs/os-specific/linux/kernel/xanmod-kernels.nix
index 4a97d8f6ecf8..01144f5d4ef5 100644
--- a/nixpkgs/pkgs/os-specific/linux/kernel/xanmod-kernels.nix
+++ b/nixpkgs/pkgs/os-specific/linux/kernel/xanmod-kernels.nix
@@ -3,14 +3,14 @@
 let
   # These names are how they are designated in https://xanmod.org.
   ltsVariant = {
-    version = "6.1.47";
-    hash = "sha256-yF05EkQ/sAvmoNW2waxNJRGGB0gnL85fFdl6pc6U8Eo=";
+    version = "6.1.52";
+    hash = "sha256-uzBmgrjNto2CwqkxdFCPeEPQnPSUZEO2pYMnKe8rCfY=";
     variant = "lts";
   };
 
   mainVariant = {
-    version = "6.4.12";
-    hash = "sha256-rvSQJb9MIOXkGEjHOPt3x+dqp1AysvQg7n5yYsg95fk=";
+    version = "6.4.15";
+    hash = "sha256-WupJJMLqgHJ7FATwNyMwAHIUl9qj0lNH7wRYRBm0CAA=";
     variant = "main";
   };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix
index 9c9682fdf9d5..dea5ad9f017f 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/bash/default.nix
@@ -95,4 +95,5 @@ bootBash.runCommand "${pname}-${version}" {
 
   # Install
   make install
+  ln -s bash $out/bin/sh
 ''
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/default.nix
index 2a10a3395ba7..55900f86d21c 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/default.nix
@@ -19,6 +19,7 @@ lib.makeScope
       bootBash = bash_2_05;
       gcc = gcc2;
       glibc = glibc22;
+      gawk = gawk-mes;
     };
 
     binutils = callPackage ./binutils {
@@ -27,11 +28,13 @@ lib.makeScope
       binutils = binutils-mes;
       glibc = glibc22;
       sed = heirloom.sed;
+      gawk = gawk-mes;
     };
     binutils-mes = callPackage ./binutils {
       bash = bash_2_05;
       tinycc = tinycc-mes;
       sed = heirloom.sed;
+      gawk = gawk-mes;
       mesBootstrap = true;
     };
 
@@ -46,20 +49,29 @@ lib.makeScope
       bash = bash_2_05;
       gcc = gcc2;
       glibc = glibc22;
+      gawk = gawk-mes;
     };
 
     findutils = callPackage ./findutils {
       bash = bash_2_05;
       gcc = gcc2;
       glibc = glibc22;
+      gawk = gawk-mes;
     };
 
-    gawk = callPackage ./gawk {
+    gawk-mes = callPackage ./gawk/mes.nix {
       bash = bash_2_05;
       tinycc = tinycc-mes;
       gnused = gnused-mes;
     };
 
+    gawk = callPackage ./gawk {
+      bash = bash_2_05;
+      gcc = gcc2;
+      glibc = glibc22;
+      bootGawk = gawk-mes;
+    };
+
     gcc2 = callPackage ./gcc/2.nix {
       bash = bash_2_05;
       gcc = gcc2-mes;
@@ -76,11 +88,13 @@ lib.makeScope
     gcc46 = callPackage ./gcc/4.6.nix {
       gcc = gcc2;
       glibc = glibc22;
+      gawk = gawk-mes;
     };
 
     inherit (callPackage ./glibc {
       bash = bash_2_05;
       gnused = gnused-mes;
+      gawk = gawk-mes;
     }) glibc22;
 
     gnugrep = callPackage ./gnugrep {
@@ -130,6 +144,11 @@ lib.makeScope
     mes = lib.recurseIntoAttrs (callPackage ./mes { });
     mes-libc = callPackage ./mes/libc.nix { };
 
+    musl = callPackage ./musl {
+      gcc = gcc46;
+      gawk = gawk-mes;
+    };
+
     stage0-posix = callPackage ./stage0-posix { };
 
     inherit (self.stage0-posix) kaem m2libc mescc-tools mescc-tools-extra;
@@ -140,6 +159,7 @@ lib.makeScope
     xz = callPackage ./xz {
       bash = bash_2_05;
       tinycc = tinycc-mes;
+      gawk = gawk-mes;
       inherit (heirloom) sed;
     };
 
@@ -153,6 +173,7 @@ lib.makeScope
       echo ${bzip2.tests.get-version}
       echo ${diffutils.tests.get-version}
       echo ${findutils.tests.get-version}
+      echo ${gawk-mes.tests.get-version}
       echo ${gawk.tests.get-version}
       echo ${gcc2.tests.get-version}
       echo ${gcc2-mes.tests.get-version}
@@ -164,6 +185,7 @@ lib.makeScope
       echo ${gzip.tests.get-version}
       echo ${heirloom.tests.get-version}
       echo ${mes.compiler.tests.get-version}
+      echo ${musl.tests.hello-world}
       echo ${tinycc-mes.compiler.tests.chain}
       echo ${xz.tests.get-version}
       mkdir ''${out}
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/common.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/common.nix
new file mode 100644
index 000000000000..d95c66d86337
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/common.nix
@@ -0,0 +1,11 @@
+{ lib }:
+
+{
+  meta = with lib; {
+    description = "GNU implementation of the Awk programming language";
+    homepage = "https://www.gnu.org/software/gawk";
+    license = licenses.gpl3Plus;
+    maintainers = teams.minimal-bootstrap.members;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/default.nix
index d840a204416d..935414f21760 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/default.nix
@@ -3,36 +3,41 @@
 , hostPlatform
 , fetchurl
 , bash
-, tinycc
+, gcc
+, glibc
+, binutils
+, linux-headers
 , gnumake
-, gnupatch
-, gnused
 , gnugrep
+, gnused
+, gnutar
+, gzip
+, bootGawk
 }:
 let
+  inherit (import ./common.nix { inherit lib; }) meta;
   pname = "gawk";
-  # >=3.1.x is incompatible with mes-libc
-  version = "3.0.6";
+  # >= 4.2.0 fails to cleanly build. may be worth investigating in the future.
+  # for now this version is sufficient to build glibc 2.16
+  version = "4.1.4";
 
   src = fetchurl {
     url = "mirror://gnu/gawk/gawk-${version}.tar.gz";
-    sha256 = "1z4bibjm7ldvjwq3hmyifyb429rs2d9bdwkvs0r171vv1khpdwmb";
+    sha256 = "0dadjkpyyizmyd0l098qps8lb39r0vrz3xl3hwz2cmjs5c70h0wc";
   };
-
-  patches = [
-    # for reproducibility don't generate date stamp
-    ./no-stamp.patch
-  ];
 in
 bash.runCommand "${pname}-${version}" {
-  inherit pname version;
+  inherit pname version meta;
 
   nativeBuildInputs = [
-    tinycc.compiler
+    gcc
+    binutils
     gnumake
-    gnupatch
     gnused
     gnugrep
+    gnutar
+    gzip
+    bootGawk
   ];
 
   passthru.tests.get-version = result:
@@ -40,33 +45,19 @@ bash.runCommand "${pname}-${version}" {
       ${result}/bin/awk --version
       mkdir $out
     '';
-
-  meta = with lib; {
-    description = "GNU implementation of the Awk programming language";
-    homepage = "https://www.gnu.org/software/gawk";
-    license = licenses.gpl3Plus;
-    maintainers = teams.minimal-bootstrap.members;
-    platforms = platforms.unix;
-  };
 } ''
   # Unpack
-  ungz --file ${src} --output gawk.tar
-  untar --file gawk.tar
-  rm gawk.tar
+  tar xzf ${src}
   cd gawk-${version}
 
-  # Patch
-  ${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
-
   # Configure
-  export CC="tcc -B ${tinycc.libs}/lib"
-  export ac_cv_func_getpgrp_void=yes
-  export ac_cv_func_tzset=yes
+  export C_INCLUDE_PATH="${glibc}/include:${linux-headers}/include"
+  export LIBRARY_PATH="${glibc}/lib"
+  export LIBS="-lc -lnss_files -lnss_dns -lresolv"
   bash ./configure \
+    --prefix=$out \
     --build=${buildPlatform.config} \
-    --host=${hostPlatform.config} \
-    --disable-nls \
-    --prefix=$out
+    --host=${hostPlatform.config}
 
   # Build
   make gawk
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/mes.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/mes.nix
new file mode 100644
index 000000000000..c14399309306
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/gawk/mes.nix
@@ -0,0 +1,70 @@
+{ lib
+, buildPlatform
+, hostPlatform
+, fetchurl
+, bash
+, tinycc
+, gnumake
+, gnupatch
+, gnused
+, gnugrep
+}:
+let
+  inherit (import ./common.nix { inherit lib; }) meta;
+  pname = "gawk-mes";
+  # >=3.1.x is incompatible with mes-libc
+  version = "3.0.6";
+
+  src = fetchurl {
+    url = "mirror://gnu/gawk/gawk-${version}.tar.gz";
+    sha256 = "1z4bibjm7ldvjwq3hmyifyb429rs2d9bdwkvs0r171vv1khpdwmb";
+  };
+
+  patches = [
+    # for reproducibility don't generate date stamp
+    ./no-stamp.patch
+  ];
+in
+bash.runCommand "${pname}-${version}" {
+  inherit pname version meta;
+
+  nativeBuildInputs = [
+    tinycc.compiler
+    gnumake
+    gnupatch
+    gnused
+    gnugrep
+  ];
+
+  passthru.tests.get-version = result:
+    bash.runCommand "${pname}-get-version-${version}" {} ''
+      ${result}/bin/awk --version
+      mkdir $out
+    '';
+} ''
+  # Unpack
+  ungz --file ${src} --output gawk.tar
+  untar --file gawk.tar
+  rm gawk.tar
+  cd gawk-${version}
+
+  # Patch
+  ${lib.concatMapStringsSep "\n" (f: "patch -Np0 -i ${f}") patches}
+
+  # Configure
+  export CC="tcc -B ${tinycc.libs}/lib"
+  export ac_cv_func_getpgrp_void=yes
+  export ac_cv_func_tzset=yes
+  bash ./configure \
+    --build=${buildPlatform.config} \
+    --host=${hostPlatform.config} \
+    --disable-nls \
+    --prefix=$out
+
+  # Build
+  make gawk
+
+  # Install
+  install -D gawk $out/bin/gawk
+  ln -s gawk $out/bin/awk
+''
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix
index 04ab2fdbfaf0..0cf66c5bc230 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/mes/default.nix
@@ -222,7 +222,6 @@ let
     mkdir -p ''${out}/bin
 
     ${srcPost.bin}/bin/mes-m2 -e main ${srcPost.bin}/bin/mescc.scm -- \
-      --base-address 0x08048000 \
       -L ''${srcPrefix}/lib \
       -L ${libs}/lib \
       -lc \
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/musl/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/musl/default.nix
new file mode 100644
index 000000000000..c252d60328e9
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/musl/default.nix
@@ -0,0 +1,87 @@
+{ lib
+, buildPlatform
+, hostPlatform
+, fetchurl
+, bash
+, gcc
+, binutils
+, gnumake
+, gnugrep
+, gnused
+, gawk
+, gnutar
+, gzip
+}:
+let
+  pname = "musl";
+  version = "1.2.4";
+
+  src = fetchurl {
+    url = "https://musl.libc.org/releases/musl-${version}.tar.gz";
+    hash = "sha256-ejXq4z1TcqfA2hGI3nmHJvaIJVE7euPr6XqqpSEU8Dk=";
+  };
+in
+bash.runCommand "${pname}-${version}" {
+  inherit pname version;
+
+  nativeBuildInputs = [
+    gcc
+    binutils
+    gnumake
+    gnused
+    gnugrep
+    gawk
+    gnutar
+    gzip
+  ];
+
+  passthru.tests.hello-world = result:
+    bash.runCommand "${pname}-simple-program-${version}" {
+        nativeBuildInputs = [ gcc binutils ];
+      } ''
+        cat <<EOF >> test.c
+        #include <stdio.h>
+        int main() {
+          printf("Hello World!\n");
+          return 0;
+        }
+        EOF
+        gcc -static -B${result}/lib -I${result}/include -o test test.c
+        ./test
+        mkdir $out
+      '';
+
+  meta = with lib; {
+    description = "An efficient, small, quality libc implementation";
+    homepage = "https://musl.libc.org";
+    license = licenses.mit;
+    maintainers = teams.minimal-bootstrap.members;
+    platforms = platforms.unix;
+  };
+} ''
+  # Unpack
+  tar xzf ${src}
+  cd musl-${version}
+
+  # Patch
+  # https://github.com/ZilchOS/bootstrap-from-tcc/blob/2e0c68c36b3437386f786d619bc9a16177f2e149/using-nix/2a3-intermediate-musl.nix
+  sed -i 's|/bin/sh|${bash}/bin/bash|' \
+    tools/*.sh
+  # patch popen/system to search in PATH instead of hardcoding /bin/sh
+  sed -i 's|posix_spawn(&pid, "/bin/sh",|posix_spawnp(\&pid, "sh",|' \
+    src/stdio/popen.c src/process/system.c
+  sed -i 's|execl("/bin/sh", "sh", "-c",|execlp("sh", "-c",|'\
+    src/misc/wordexp.c
+
+  # Configure
+  bash ./configure \
+    --prefix=$out \
+    --build=${buildPlatform.config} \
+    --host=${hostPlatform.config}
+
+  # Build
+  make
+
+  # Install
+  make install
+''
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix
index 82ee4d12386e..203b480326e9 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix
@@ -9,14 +9,6 @@ rec {
   outputHashAlgo = "sha256";
   outputHash = "sha256-FpMp7z+B3cR3LkQ+PooH/b1/NlxH8NHVJNWifaPWt4U=";
 
-  # This 256 byte seed is the only pre-compiled binary in the bootstrap chain.
-  hex0-seed = import <nix/fetchurl.nix> {
-    name = "hex0-seed-${version}";
-    url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/x86/hex0-seed";
-    hash = "sha256-QU3RPGy51W7M2xnfFY1IqruKzusrSLU+L190ztN6JW8=";
-    executable = true;
-  };
-
   /*
   Since `make-minimal-bootstrap-sources` requires nixpkgs and nix it
   will create a circular dependency if it is used in place of the
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix
index c15223a43d48..9f3d61b92bc9 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/default.nix
@@ -3,21 +3,23 @@
 }:
 
 lib.makeScope newScope (self: with self; {
-  inherit (self.callPackage ./bootstrap-sources.nix {})
-    version hex0-seed minimal-bootstrap-sources;
+  inherit (callPackage ./platforms.nix { }) platforms stage0Arch m2libcArch m2libcOS baseAddress;
+
+  inherit (self.callPackage ./bootstrap-sources.nix {}) version minimal-bootstrap-sources;
 
   src = minimal-bootstrap-sources;
 
   m2libc = src + "/M2libc";
 
   hex0 = callPackage ./hex0.nix { };
+  inherit (self.hex0) hex0-seed;
 
   kaem = callPackage ./kaem { };
   kaem-minimal = callPackage ./kaem/minimal.nix { };
 
-  stage0-posix-x86 = callPackage ./stage0-posix-x86.nix { };
+  mescc-tools-boot = callPackage ./mescc-tools-boot.nix { };
 
-  inherit (self.stage0-posix-x86) blood-elf-0 hex2 kaem-unwrapped M1 M2;
+  inherit (self.mescc-tools-boot) blood-elf-0 hex2 kaem-unwrapped M1 M2;
 
   mescc-tools = callPackage ./mescc-tools { };
 
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix
index b85b2f2cac14..996f2f33ea35 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/hex0.nix
@@ -1,15 +1,33 @@
 { lib
 , derivationWithMeta
-, hex0-seed
+, hostPlatform
 , src
 , version
+, platforms
+, stage0Arch
 }:
+
+let
+  hash = {
+    "x86"   = "sha256-QU3RPGy51W7M2xnfFY1IqruKzusrSLU+L190ztN6JW8=";
+    "AMD64" = "sha256-RCgK9oZRDQUiWLVkcIBSR2HeoB+Bh0czthrpjFEkCaY=";
+  }.${stage0Arch} or (throw "Unsupported system: ${hostPlatform.system}");
+
+  # Pinned from https://github.com/oriansj/stage0-posix/commit/3189b5f325b7ef8b88e3edec7c1cde4fce73c76c
+  # This 256 byte seed is the only pre-compiled binary in the bootstrap chain.
+  hex0-seed = import <nix/fetchurl.nix> {
+    name = "hex0-seed";
+    url = "https://github.com/oriansj/bootstrap-seeds/raw/b1263ff14a17835f4d12539226208c426ced4fba/POSIX/${stage0Arch}/hex0-seed";
+    executable = true;
+    inherit hash;
+  };
+in
 derivationWithMeta {
   inherit version;
   pname = "hex0";
   builder = hex0-seed;
   args = [
-    "${src}/x86/hex0_x86.hex0"
+    "${src}/${stage0Arch}/hex0_${stage0Arch}.hex0"
     (placeholder "out")
   ];
 
@@ -18,11 +36,13 @@ derivationWithMeta {
     homepage = "https://github.com/oriansj/stage0-posix";
     license = licenses.gpl3Plus;
     maintainers = teams.minimal-bootstrap.members;
-    platforms = [ "i686-linux" ];
+    inherit platforms;
   };
 
+  passthru = { inherit hex0-seed; };
+
   # Ensure the untrusted hex0-seed binary produces a known-good hex0
   outputHashMode = "recursive";
   outputHashAlgo = "sha256";
-  outputHash = "sha256-QU3RPGy51W7M2xnfFY1IqruKzusrSLU+L190ztN6JW8=";
+  outputHash = hash;
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/default.nix
index 77e9a8e8d63f..547790835c5d 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/default.nix
@@ -6,6 +6,7 @@
 , mescc-tools
 , mescc-tools-extra
 , version
+, platforms
 }:
 
 # Once mescc-tools-extra is available we can install kaem at /bin/kaem
@@ -46,6 +47,6 @@ derivationWithMeta {
     homepage = "https://github.com/oriansj/mescc-tools";
     license = licenses.gpl3Plus;
     maintainers = teams.minimal-bootstrap.members;
-    platforms = [ "i686-linux" ];
+    inherit platforms;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix
index 24fc77f8d345..ae31302894aa 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/kaem/minimal.nix
@@ -3,13 +3,15 @@
 , src
 , hex0
 , version
+, platforms
+, stage0Arch
 }:
 derivationWithMeta {
   inherit version;
   pname = "kaem-minimal";
   builder = hex0;
   args = [
-    "${src}/x86/kaem-minimal.hex0"
+    "${src}/${stage0Arch}/kaem-minimal.hex0"
     (placeholder "out")
   ];
 
@@ -18,7 +20,7 @@ derivationWithMeta {
     homepage = "https://github.com/oriansj/stage0-posix";
     license = licenses.gpl3Plus;
     maintainers = teams.minimal-bootstrap.members;
-    platforms = [ "i686-linux" ];
+    inherit platforms;
   };
 }
 
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-boot.nix
index bcb02537b916..65f0fb4c2ff1 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/stage0-posix-x86.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-boot.nix
@@ -1,10 +1,3 @@
-# This is a translation of stage0-posix/stage0-posix/x86/mescc-tools-mini-kaem.kaem to nix
-# https://github.com/oriansj/stage0-posix-x86/blob/56e6b8df3e95f4bc04f8b420a4cd8c82c70b9efa/mescc-tools-mini-kaem.kaem
-#
-# We have access to mini-kaem at this point but it doesn't support substituting
-# environment variables. Without variables there's no way of passing in store inputs,
-# or the $out path, other than as command line arguments directly
-
 # Mes --- Maxwell Equations of Software
 # Copyright © 2017,2019 Jan Nieuwenhuizen <janneke@gnu.org>
 # Copyright © 2017,2019 Jeremiah Orians
@@ -24,19 +17,35 @@
 # You should have received a copy of the GNU General Public License
 # along with Mes.  If not, see <http://www.gnu.org/licenses/>.
 
+# This is a translation of stage0-posix/stage0-posix/x86/mescc-tools-mini-kaem.kaem to nix
+# https://github.com/oriansj/stage0-posix-x86/blob/56e6b8df3e95f4bc04f8b420a4cd8c82c70b9efa/mescc-tools-mini-kaem.kaem
+#
+# We have access to mini-kaem at this point but it doesn't support substituting
+# environment variables. Without variables there's no way of passing in store inputs,
+# or the $out path, other than as command line arguments directly
+
 # Warning all binaries prior to the use of blood-elf will not be readable by
 # Objdump, you may need to use ndism or gdb to view the assembly in the binary.
 
 { lib
 , derivationWithMeta
+, hostPlatform
 , hex0
 , m2libc
 , src
 , version
+, platforms
+, stage0Arch
+, m2libcArch
+, baseAddress
 }:
 rec {
   out = placeholder "out";
 
+  endianFlag = if hostPlatform.isLittleEndian then "--little-endian" else "--big-endian";
+
+  bloodFlags = lib.optional hostPlatform.is64bit "--64";
+
   run = pname: builder: args:
     derivationWithMeta {
       inherit pname version builder args;
@@ -46,7 +55,7 @@ rec {
         homepage = "https://github.com/oriansj/stage0-posix";
         license = licenses.gpl3Plus;
         maintainers = teams.minimal-bootstrap.members;
-        platforms = [ "i686-linux" ];
+        inherit platforms;
       };
     };
 
@@ -54,7 +63,7 @@ rec {
   # Phase-1 Build hex1 from hex0 #
   ################################
 
-  hex1 = run "hex1" hex0 ["${src}/x86/hex1_x86.hex0" out];
+  hex1 = run "hex1" hex0 ["${src}/${stage0Arch}/hex1_${stage0Arch}.hex0" out];
 
   # hex1 adds support for single character labels and is available in various forms
   # in mescc-tools/x86_bootstrap to allow you various ways to verify correctness
@@ -63,7 +72,7 @@ rec {
   # Phase-2 Build hex2 from hex1 #
   ################################
 
-  hex2-0 = run "hex2" hex1 ["${src}/x86/hex2_x86.hex1" out];
+  hex2-0 = run "hex2" hex1 ["${src}/${stage0Arch}/hex2_${stage0Arch}.hex1" out];
 
   # hex2 adds support for long labels and absolute addresses thus allowing it
   # to function as an effective linker for later stages of the bootstrap
@@ -74,7 +83,7 @@ rec {
   # Phase-2b Build catm from hex2 #
   #################################
 
-  catm = run "catm" hex2-0 ["${src}/x86/catm_x86.hex2" out];
+  catm = run "catm" hex2-0 ["${src}/${stage0Arch}/catm_${stage0Arch}.hex2" out];
 
   # catm removes the need for cat or shell support for redirection by providing
   # equivalent functionality via catm output_file input1 input2 ... inputN
@@ -83,27 +92,27 @@ rec {
   # Phase-3 Build M0 from hex2 #
   ##############################
 
-  M0_hex2 = run "M0.hex2" catm [out "${src}/x86/ELF-i386.hex2" "${src}/x86/M0_x86.hex2"];
+  M0_hex2 = run "M0.hex2" catm [out "${m2libc}/${m2libcArch}/ELF-${m2libcArch}.hex2" "${src}/${stage0Arch}/M0_${stage0Arch}.hex2"];
   M0 = run "M0" hex2-0 [M0_hex2 out];
 
   # M0 is the architecture specific version of M1 and is by design single
   # architecture only and will be replaced by the C code version of M1
 
   ################################
-  # Phase-4 Build cc_x86 from M0 #
+  # Phase-4 Build cc_arch from M0 #
   ################################
 
-  cc_x86-0_hex2 = run "cc_x86-0.hex2" M0 ["${src}/x86/cc_x86.M1" out];
-  cc_x86-1_hex2 = run "cc_x86-1.hex2" catm [out "${src}/x86/ELF-i386.hex2" cc_x86-0_hex2];
-  cc_x86 = run "cc_x86" hex2-0 [cc_x86-1_hex2 out];
+  cc_arch-0_hex2 = run "cc_arch-0.hex2" M0 ["${src}/${stage0Arch}/cc_${m2libcArch}.M1" out];
+  cc_arch-1_hex2 = run "cc_arch-1.hex2" catm [out "${m2libc}/${m2libcArch}/ELF-${m2libcArch}.hex2" cc_arch-0_hex2];
+  cc_arch = run "cc_arch" hex2-0 [cc_arch-1_hex2 out];
 
-  #######################################
-  # Phase-5 Build M2-Planet from cc_x86 #
-  #######################################
+  ########################################
+  # Phase-5 Build M2-Planet from cc_arch #
+  ########################################
 
   M2-0_c = run "M2-0.c" catm [
     out
-    "${m2libc}/x86/linux/bootstrap.c"
+    "${m2libc}/${m2libcArch}/linux/bootstrap.c"
     "${src}/M2-Planet/cc.h"
     "${m2libc}/bootstrappable.c"
     "${src}/M2-Planet/cc_globals.c"
@@ -114,10 +123,10 @@ rec {
     "${src}/M2-Planet/cc_macro.c"
     "${src}/M2-Planet/cc.c"
   ];
-  M2-0_M1 = run "M2-0.M1" cc_x86 [M2-0_c out];
-  M2-0-0_M1 = run "M2-0-0.M1" catm [out "${src}/x86/x86_defs.M1" "${src}/x86/libc-core.M1" M2-0_M1];
+  M2-0_M1 = run "M2-0.M1" cc_arch [M2-0_c out];
+  M2-0-0_M1 = run "M2-0-0.M1" catm [out "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1" "${m2libc}/${m2libcArch}/libc-core.M1" M2-0_M1];
   M2-0_hex2 = run "M2-0.hex2" M0 [M2-0-0_M1 out];
-  M2-0-0_hex2 = run "M2-0-0.hex2" catm [out "${src}/x86/ELF-i386.hex2" M2-0_hex2];
+  M2-0-0_hex2 = run "M2-0-0.hex2" catm [out "${m2libc}/${m2libcArch}/ELF-${m2libcArch}.hex2" M2-0_hex2];
   M2 = run "M2" hex2-0 [M2-0-0_hex2 out];
 
   ############################################
@@ -125,8 +134,8 @@ rec {
   ############################################
 
   blood-elf-0_M1 = run "blood-elf-0.M1" M2 [
-    "--architecture" "x86"
-    "-f" "${m2libc}/x86/linux/bootstrap.c"
+    "--architecture" m2libcArch
+    "-f" "${m2libc}/${m2libcArch}/linux/bootstrap.c"
     "-f" "${m2libc}/bootstrappable.c"
     "-f" "${src}/mescc-tools/stringify.c"
     "-f" "${src}/mescc-tools/blood-elf.c"
@@ -134,9 +143,9 @@ rec {
     "-o" out
   ];
 
-  blood-elf-0-0_M1 = run "blood-elf-0-0.M1" catm [out "${m2libc}/x86/x86_defs.M1" "${m2libc}/x86/libc-core.M1" blood-elf-0_M1];
+  blood-elf-0-0_M1 = run "blood-elf-0-0.M1" catm [out "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1" "${m2libc}/${m2libcArch}/libc-core.M1" blood-elf-0_M1];
   blood-elf-0_hex2 = run "blood-elf-0.hex2" M0 [blood-elf-0-0_M1 out];
-  blood-elf-0-0_hex2 = run "blood-elf-0-0.hex2" catm [out "${m2libc}/x86/ELF-x86.hex2" blood-elf-0_hex2];
+  blood-elf-0-0_hex2 = run "blood-elf-0-0.hex2" catm [out "${m2libc}/${m2libcArch}/ELF-${m2libcArch}.hex2" blood-elf-0_hex2];
   blood-elf-0 = run "blood-elf-0" hex2-0 [blood-elf-0-0_hex2 out];
 
   # This is the last stage where the binaries will not have debug info
@@ -147,8 +156,8 @@ rec {
   #####################################
 
   M1-macro-0_M1 = run "M1-macro-0.M1" M2 [
-    "--architecture" "x86"
-    "-f" "${m2libc}/x86/linux/bootstrap.c"
+    "--architecture" m2libcArch
+    "-f" "${m2libc}/${m2libcArch}/linux/bootstrap.c"
     "-f" "${m2libc}/bootstrappable.c"
     "-f" "${src}/mescc-tools/stringify.c"
     "-f" "${src}/mescc-tools/M1-macro.c"
@@ -157,10 +166,10 @@ rec {
     "-o" out
   ];
 
-  M1-macro-0-footer_M1 = run "M1-macro-0-footer.M1" blood-elf-0 ["-f" M1-macro-0_M1 "--little-endian" "-o" out];
-  M1-macro-0-0_M1 = run "M1-macro-0-0.M1" catm [out "${m2libc}/x86/x86_defs.M1" "${m2libc}/x86/libc-core.M1" M1-macro-0_M1 M1-macro-0-footer_M1];
+  M1-macro-0-footer_M1 = run "M1-macro-0-footer.M1" blood-elf-0 (bloodFlags ++ ["-f" M1-macro-0_M1 endianFlag "-o" out]);
+  M1-macro-0-0_M1 = run "M1-macro-0-0.M1" catm [out "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1" "${m2libc}/${m2libcArch}/libc-core.M1" M1-macro-0_M1 M1-macro-0-footer_M1];
   M1-macro-0_hex2 = run "M1-macro-0.hex2" M0 [M1-macro-0-0_M1 out];
-  M1-macro-0-0_hex2 = run "M1-macro-0-0.hex2" catm [out "${m2libc}/x86/ELF-x86-debug.hex2" M1-macro-0_hex2];
+  M1-macro-0-0_hex2 = run "M1-macro-0-0.hex2" catm [out "${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2" M1-macro-0_hex2];
   M1-0 = run "M1-0" hex2-0 [M1-macro-0-0_hex2 out];
 
   # This is the last stage where catm will need to be used and the last stage where
@@ -172,13 +181,13 @@ rec {
   #######################################
 
   hex2_linker-0_M1 = run "hex2_linker-0.M1" M2 [
-    "--architecture" "x86"
+    "--architecture" m2libcArch
     "-f" "${m2libc}/sys/types.h"
     "-f" "${m2libc}/stddef.h"
-    "-f" "${m2libc}/x86/linux/unistd.c"
-    "-f" "${m2libc}/x86/linux/fcntl.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/unistd.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/fcntl.c"
     "-f" "${m2libc}/fcntl.c"
-    "-f" "${m2libc}/x86/linux/sys/stat.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/sys/stat.c"
     "-f" "${m2libc}/stdlib.c"
     "-f" "${m2libc}/stdio.h"
     "-f" "${m2libc}/stdio.c"
@@ -191,19 +200,19 @@ rec {
     "-o" out
   ];
 
-  hex2_linker-0-footer_M1 = run "hex2_linker-0-footer.M1" blood-elf-0 ["-f" hex2_linker-0_M1 "--little-endian" "-o" out];
+  hex2_linker-0-footer_M1 = run "hex2_linker-0-footer.M1" blood-elf-0 (bloodFlags ++ ["-f" hex2_linker-0_M1 endianFlag "-o" out]);
 
   hex2_linker-0_hex2 = run "hex2_linker-0.hex2" M1-0 [
-    "--architecture" "x86"
-    "--little-endian"
-    "-f" "${m2libc}/x86/x86_defs.M1"
-    "-f" "${m2libc}/x86/libc-full.M1"
+    "--architecture" m2libcArch
+    endianFlag
+    "-f" "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1"
+    "-f" "${m2libc}/${m2libcArch}/libc-full.M1"
     "-f" hex2_linker-0_M1
     "-f" hex2_linker-0-footer_M1
     "-o" out
   ];
 
-  hex2_linker-0-0_hex2 = run "hex2_linker-0-0.hex2" catm [out "${m2libc}/x86/ELF-x86-debug.hex2" hex2_linker-0_hex2];
+  hex2_linker-0-0_hex2 = run "hex2_linker-0-0.hex2" catm [out "${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2" hex2_linker-0_hex2];
 
   hex2-1 = run "hex2-1" hex2-0 [hex2_linker-0-0_hex2 out];
 
@@ -215,12 +224,12 @@ rec {
   ###################################
 
   M1-macro-1_M1 = run "M1-macro-1.M1" M2 [
-    "--architecture" "x86"
+    "--architecture" m2libcArch
     "-f" "${m2libc}/sys/types.h"
     "-f" "${m2libc}/stddef.h"
-    "-f" "${m2libc}/x86/linux/fcntl.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/fcntl.c"
     "-f" "${m2libc}/fcntl.c"
-    "-f" "${m2libc}/x86/linux/unistd.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/unistd.c"
     "-f" "${m2libc}/string.c"
     "-f" "${m2libc}/stdlib.c"
     "-f" "${m2libc}/stdio.h"
@@ -232,23 +241,23 @@ rec {
     "-o" out
   ];
 
-  M1-macro-1-footer_M1 = run "M1-macro-1-footer.M1" blood-elf-0 ["-f" M1-macro-1_M1 "--little-endian" "-o" out];
+  M1-macro-1-footer_M1 = run "M1-macro-1-footer.M1" blood-elf-0 (bloodFlags ++ ["-f" M1-macro-1_M1 endianFlag "-o" out]);
 
   M1-macro-1_hex2 = run "M1-macro-1.hex2" M1-0 [
-    "--architecture" "x86"
-    "--little-endian"
-    "-f" "${m2libc}/x86/x86_defs.M1"
-    "-f" "${m2libc}/x86/libc-full.M1"
+    "--architecture" m2libcArch
+    endianFlag
+    "-f" "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1"
+    "-f" "${m2libc}/${m2libcArch}/libc-full.M1"
     "-f" M1-macro-1_M1
     "-f" M1-macro-1-footer_M1
     "-o" out
   ];
 
   M1 = run "M1" hex2-1 [
-    "--architecture" "x86"
-    "--little-endian"
-    "--base-address" "0x8048000"
-    "-f" "${m2libc}/x86/ELF-x86-debug.hex2"
+    "--architecture" m2libcArch
+    endianFlag
+    "--base-address" baseAddress
+    "-f" "${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2"
     "-f" M1-macro-1_hex2
     "-o" out
   ];
@@ -258,13 +267,13 @@ rec {
   ######################################
 
   hex2_linker-2_M1 = run "hex2_linker-2.M1" M2 [
-    "--architecture" "x86"
+    "--architecture" m2libcArch
     "-f" "${m2libc}/sys/types.h"
     "-f" "${m2libc}/stddef.h"
-    "-f" "${m2libc}/x86/linux/unistd.c"
-    "-f" "${m2libc}/x86/linux/fcntl.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/unistd.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/fcntl.c"
     "-f" "${m2libc}/fcntl.c"
-    "-f" "${m2libc}/x86/linux/sys/stat.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/sys/stat.c"
     "-f" "${m2libc}/stdlib.c"
     "-f" "${m2libc}/stdio.h"
     "-f" "${m2libc}/stdio.c"
@@ -277,23 +286,23 @@ rec {
     "-o" out
   ];
 
-  hex2_linker-2-footer_M1 = run "hex2_linker-2-footer.M1" blood-elf-0 ["-f" hex2_linker-2_M1 "--little-endian" "-o" out];
+  hex2_linker-2-footer_M1 = run "hex2_linker-2-footer.M1" blood-elf-0 (bloodFlags ++ ["-f" hex2_linker-2_M1 endianFlag "-o" out]);
 
   hex2_linker-2_hex2 = run "hex2_linker-2.hex2" M1 [
-    "--architecture" "x86"
-    "--little-endian"
-    "-f" "${m2libc}/x86/x86_defs.M1"
-    "-f" "${m2libc}/x86/libc-full.M1"
+    "--architecture" m2libcArch
+    endianFlag
+    "-f" "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1"
+    "-f" "${m2libc}/${m2libcArch}/libc-full.M1"
     "-f" hex2_linker-2_M1
     "-f" hex2_linker-2-footer_M1
     "-o" out
   ];
 
   hex2 = run "hex2" hex2-1 [
-    "--architecture" "x86"
-    "--little-endian"
-    "--base-address" "0x8048000"
-    "-f" "${m2libc}/x86/ELF-x86-debug.hex2"
+    "--architecture" m2libcArch
+    endianFlag
+    "--base-address" baseAddress
+    "-f" "${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2"
     "-f" hex2_linker-2_hex2
     "-o" out
   ];
@@ -303,12 +312,12 @@ rec {
   ######################################
 
   kaem_M1 = run "kaem.M1" M2 [
-    "--architecture" "x86"
+    "--architecture" m2libcArch
     "-f" "${m2libc}/sys/types.h"
     "-f" "${m2libc}/stddef.h"
     "-f" "${m2libc}/string.c"
-    "-f" "${m2libc}/x86/linux/unistd.c"
-    "-f" "${m2libc}/x86/linux/fcntl.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/unistd.c"
+    "-f" "${m2libc}/${m2libcArch}/linux/fcntl.c"
     "-f" "${m2libc}/fcntl.c"
     "-f" "${m2libc}/stdlib.c"
     "-f" "${m2libc}/stdio.h"
@@ -322,24 +331,24 @@ rec {
     "-o" out
   ];
 
-  kaem-footer_M1 = run "kaem-footer.M1" blood-elf-0 ["-f" kaem_M1 "--little-endian" "-o" out];
+  kaem-footer_M1 = run "kaem-footer.M1" blood-elf-0 (bloodFlags ++ ["-f" kaem_M1 endianFlag "-o" out]);
 
   kaem_hex2 = run "kaem.hex2" M1 [
-    "--architecture" "x86"
-    "--little-endian"
-    "-f" "${m2libc}/x86/x86_defs.M1"
-    "-f" "${m2libc}/x86/libc-full.M1"
+    "--architecture" m2libcArch
+    endianFlag
+    "-f" "${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1"
+    "-f" "${m2libc}/${m2libcArch}/libc-full.M1"
     "-f" kaem_M1
     "-f" kaem-footer_M1
     "-o" out
   ];
 
   kaem-unwrapped = run "kaem-unwrapped" hex2 [
-    "--architecture" "x86"
-    "--little-endian"
-    "-f" "${m2libc}/x86/ELF-x86-debug.hex2"
+    "--architecture" m2libcArch
+    endianFlag
+    "-f" "${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2"
     "-f" kaem_hex2
-    "--base-address" "0x8048000"
+    "--base-address" baseAddress
     "-o" out
   ];
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem
index e50fc1c68474..fb27eccab830 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/build.kaem
@@ -19,7 +19,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with mescc-tools.  If not, see <http://www.gnu.org/licenses/>.
 
-alias CC="${mescc-tools}/bin/M2-Mesoplanet --operating-system ${OPERATING_SYSTEM} --architecture ${ARCH} -f"
+alias CC="${mescc-tools}/bin/M2-Mesoplanet --operating-system ${m2libcOS} --architecture ${m2libcArch} -f"
 cd ${src}/mescc-tools-extra
 
 # Create output folder
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/default.nix
index 425a10cfb35a..eee00491c446 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools-extra/default.nix
@@ -4,9 +4,12 @@
 , mescc-tools
 , src
 , version
+, platforms
+, m2libcArch
+, m2libcOS
 }:
 derivationWithMeta {
-  inherit version src mescc-tools;
+  inherit version src mescc-tools m2libcArch m2libcOS;
   pname = "mescc-tools-extra";
   builder = kaem-unwrapped;
   args = [
@@ -16,14 +19,11 @@ derivationWithMeta {
     ./build.kaem
   ];
 
-  ARCH = "x86";
-  OPERATING_SYSTEM = "linux";
-
   meta = with lib; {
     description = "Collection of tools written for use in bootstrapping";
     homepage = "https://github.com/oriansj/mescc-tools-extra";
     license = licenses.gpl3Plus;
     maintainers = teams.minimal-bootstrap.members;
-    platforms = [ "i686-linux" ];
+    inherit platforms;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem
index 3a7ae25fbd82..128ff360fd2c 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/build.kaem
@@ -46,13 +46,13 @@ ${replace} \
 # Phase-12 Build M2-Mesoplanet from M2-Planet #
 ###############################################
 
-${M2} --architecture ${ARCH} \
+${M2} --architecture ${m2libcArch} \
   -f ${m2libc}/sys/types.h \
   -f ${m2libc}/stddef.h \
-  -f ${m2libc}/${ARCH}/linux/fcntl.c \
+  -f ${m2libc}/${m2libcArch}/linux/fcntl.c \
   -f ${m2libc}/fcntl.c \
-  -f ${m2libc}/${ARCH}/linux/unistd.c \
-  -f ${m2libc}/${ARCH}/linux/sys/stat.c \
+  -f ${m2libc}/${m2libcArch}/linux/unistd.c \
+  -f ${m2libc}/${m2libcArch}/linux/sys/stat.c \
   -f ${m2libc}/stdlib.c \
   -f ${m2libc}/stdio.h \
   -f ${m2libc}/stdio.c \
@@ -69,20 +69,20 @@ ${M2} --architecture ${ARCH} \
   --debug \
   -o ./M2-Mesoplanet-1.M1
 
-${blood-elf-0} ${ENDIAN_FLAG} ${BLOOD_FLAG} -f ./M2-Mesoplanet-1.M1 -o ./M2-Mesoplanet-1-footer.M1
+${blood-elf-0} ${endianFlag} ${bloodFlag} -f ./M2-Mesoplanet-1.M1 -o ./M2-Mesoplanet-1-footer.M1
 
-${M1} --architecture ${ARCH} \
-  ${ENDIAN_FLAG} \
-  -f ${m2libc}/${ARCH}/${ARCH}_defs.M1 \
-  -f ${m2libc}/${ARCH}/libc-full.M1 \
+${M1} --architecture ${m2libcArch} \
+  ${endianFlag} \
+  -f ${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1 \
+  -f ${m2libc}/${m2libcArch}/libc-full.M1 \
   -f ./M2-Mesoplanet-1.M1 \
   -f ./M2-Mesoplanet-1-footer.M1 \
   -o ./M2-Mesoplanet-1.hex2
 
-${hex2} --architecture ${ARCH} \
-  ${ENDIAN_FLAG} \
-  --base-address ${BASE_ADDRESS} \
-  -f ${m2libc}/${ARCH}/ELF-${ARCH}-debug.hex2 \
+${hex2} --architecture ${m2libcArch} \
+  ${endianFlag} \
+  --base-address ${baseAddress} \
+  -f ${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2 \
   -f ./M2-Mesoplanet-1.hex2 \
   -o ${out}/bin/M2-Mesoplanet
 
@@ -90,12 +90,12 @@ ${hex2} --architecture ${ARCH} \
 # Phase-13 Build final blood-elf from C sources #
 #################################################
 
-${M2} --architecture ${ARCH} \
+${M2} --architecture ${m2libcArch} \
 	-f ${m2libc}/sys/types.h \
 	-f ${m2libc}/stddef.h \
-	-f ${m2libc}/${ARCH}/linux/fcntl.c \
+	-f ${m2libc}/${m2libcArch}/linux/fcntl.c \
 	-f ${m2libc}/fcntl.c \
-	-f ${m2libc}/${ARCH}/linux/unistd.c \
+	-f ${m2libc}/${m2libcArch}/linux/unistd.c \
 	-f ${m2libc}/stdlib.c \
 	-f ${m2libc}/stdio.h \
 	-f ${m2libc}/stdio.c \
@@ -105,19 +105,20 @@ ${M2} --architecture ${ARCH} \
 	--debug \
 	-o ./blood-elf-1.M1
 
-${blood-elf-0} ${BLOOD_FLAG} ${ENDIAN_FLAG} -f ./blood-elf-1.M1 -o ./blood-elf-1-footer.M1
-${M1} --architecture ${ARCH} \
-	${ENDIAN_FLAG} \
-	-f ${m2libc}/${ARCH}/${ARCH}_defs.M1 \
-	-f ${m2libc}/${ARCH}/libc-full.M1 \
+${blood-elf-0} ${endianFlag} ${bloodFlag} -f ./blood-elf-1.M1 -o ./blood-elf-1-footer.M1
+
+${M1} --architecture ${m2libcArch} \
+	${endianFlag} \
+	-f ${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1 \
+	-f ${m2libc}/${m2libcArch}/libc-full.M1 \
 	-f ./blood-elf-1.M1 \
 	-f ./blood-elf-1-footer.M1 \
 	-o ./blood-elf-1.hex2
 
-${hex2} --architecture ${ARCH} \
-	${ENDIAN_FLAG} \
-	--base-address ${BASE_ADDRESS} \
-	-f ${m2libc}/${ARCH}/ELF-${ARCH}-debug.hex2 \
+${hex2} --architecture ${m2libcArch} \
+	${endianFlag} \
+	--base-address ${baseAddress} \
+	-f ${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2 \
 	-f ./blood-elf-1.hex2 \
 	-o ${out}/bin/blood-elf
 
@@ -129,11 +130,11 @@ ${hex2} --architecture ${ARCH} \
 # Phase-14 Build get_machine from C sources #
 #############################################
 
-${M2} --architecture ${ARCH} \
+${M2} --architecture ${m2libcArch} \
 	-f ${m2libc}/sys/types.h \
 	-f ${m2libc}/stddef.h \
-	-f ${m2libc}/${ARCH}/linux/unistd.c \
-	-f ${m2libc}/${ARCH}/linux/fcntl.c \
+	-f ${m2libc}/${m2libcArch}/linux/unistd.c \
+	-f ${m2libc}/${m2libcArch}/linux/fcntl.c \
 	-f ${m2libc}/fcntl.c \
 	-f ${m2libc}/stdlib.c \
 	-f ${m2libc}/stdio.h \
@@ -143,20 +144,20 @@ ${M2} --architecture ${ARCH} \
 	--debug \
 	-o get_machine.M1
 
-${out}/bin/blood-elf ${BLOOD_FLAG} ${ENDIAN_FLAG} -f ./get_machine.M1 -o ./get_machine-footer.M1
+${out}/bin/blood-elf ${endianFlag} ${bloodFlag} -f ./get_machine.M1 -o ./get_machine-footer.M1
 
-${M1} --architecture ${ARCH} \
-	${ENDIAN_FLAG} \
-	-f ${m2libc}/${ARCH}/${ARCH}_defs.M1 \
-	-f ${m2libc}/${ARCH}/libc-full.M1 \
+${M1} --architecture ${m2libcArch} \
+	${endianFlag} \
+	-f ${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1 \
+	-f ${m2libc}/${m2libcArch}/libc-full.M1 \
 	-f ./get_machine.M1 \
 	-f ./get_machine-footer.M1 \
 	-o ./get_machine.hex2
 
-${hex2} --architecture ${ARCH} \
-	${ENDIAN_FLAG} \
-	--base-address ${BASE_ADDRESS} \
-	-f ${m2libc}/${ARCH}/ELF-${ARCH}-debug.hex2 \
+${hex2} --architecture ${m2libcArch} \
+	${endianFlag} \
+	--base-address ${baseAddress} \
+	-f ${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2 \
 	-f ./get_machine.hex2 \
 	-o ${out}/bin/get_machine
 
@@ -164,11 +165,11 @@ ${hex2} --architecture ${ARCH} \
 # Phase-15 Build M2-Planet from M2-Planet  #
 ############################################
 
-${M2} --architecture ${ARCH} \
+${M2} --architecture ${m2libcArch} \
 	-f ${m2libc}/sys/types.h \
 	-f ${m2libc}/stddef.h \
-	-f ${m2libc}/${ARCH}/linux/unistd.c \
-	-f ${m2libc}/${ARCH}/linux/fcntl.c \
+	-f ${m2libc}/${m2libcArch}/linux/unistd.c \
+	-f ${m2libc}/${m2libcArch}/linux/fcntl.c \
 	-f ${m2libc}/fcntl.c \
 	-f ${m2libc}/stdlib.c \
 	-f ${m2libc}/stdio.h \
@@ -185,20 +186,19 @@ ${M2} --architecture ${ARCH} \
 	--debug \
 	-o ./M2-1.M1
 
-${out}/bin/blood-elf ${ENDIAN_FLAG} ${BLOOD_FLAG} -f ./M2-1.M1 -o ./M2-1-footer.M1
+${out}/bin/blood-elf ${endianFlag} ${bloodFlag} -f ./M2-1.M1 -o ./M2-1-footer.M1
 
-${M1} --architecture ${ARCH} \
-	${ENDIAN_FLAG} \
-	-f ${m2libc}/${ARCH}/${ARCH}_defs.M1 \
-	-f ${m2libc}/${ARCH}/libc-full.M1 \
+${M1} --architecture ${m2libcArch} \
+	${endianFlag} \
+	-f ${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1 \
+	-f ${m2libc}/${m2libcArch}/libc-full.M1 \
 	-f ./M2-1.M1 \
 	-f ./M2-1-footer.M1 \
 	-o ./M2-1.hex2
 
-${hex2} --architecture ${ARCH} \
-	${ENDIAN_FLAG} \
-	--base-address ${BASE_ADDRESS} \
-	-f ${m2libc}/${ARCH}/ELF-${ARCH}-debug.hex2 \
+${hex2} --architecture ${m2libcArch} \
+	${endianFlag} \
+	--base-address ${baseAddress} \
+	-f ${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2 \
 	-f ./M2-1.hex2 \
 	-o ${out}/bin/M2-Planet
-
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/default.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/default.nix
index c4aca823203d..4a9c734981e2 100644
--- a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/mescc-tools/default.nix
@@ -1,5 +1,6 @@
 { lib
 , derivationWithMeta
+, hostPlatform
 , kaem-unwrapped
 , M1
 , M2
@@ -8,13 +9,14 @@
 , m2libc
 , src
 , version
+, platforms
+, m2libcArch
+, baseAddress
 }:
 
 let
-  ARCH = "x86";
-  BLOOD_FLAG = " ";
-  BASE_ADDRESS = "0x8048000";
-  ENDIAN_FLAG = "--little-endian";
+  endianFlag = if hostPlatform.isLittleEndian then "--little-endian" else "--big-endian";
+  bloodFlag = if hostPlatform.is64bit then "--64" else " ";
 
   # We need a few tools from mescc-tools-extra to assemble the output folder
   buildMesccToolsExtraUtil = name:
@@ -26,13 +28,13 @@ let
         "--strict"
         "--file"
         (builtins.toFile "build-${name}.kaem" ''
-          ''${M2} --architecture ''${ARCH} \
+          ''${M2} --architecture ${m2libcArch} \
             -f ''${m2libc}/sys/types.h \
             -f ''${m2libc}/stddef.h \
-            -f ''${m2libc}/''${ARCH}/linux/fcntl.c \
+            -f ''${m2libc}/${m2libcArch}/linux/fcntl.c \
             -f ''${m2libc}/fcntl.c \
-            -f ''${m2libc}/''${ARCH}/linux/unistd.c \
-            -f ''${m2libc}/''${ARCH}/linux/sys/stat.c \
+            -f ''${m2libc}/${m2libcArch}/linux/unistd.c \
+            -f ''${m2libc}/${m2libcArch}/linux/sys/stat.c \
             -f ''${m2libc}/stdlib.c \
             -f ''${m2libc}/stdio.h \
             -f ''${m2libc}/stdio.c \
@@ -42,25 +44,25 @@ let
             --debug \
             -o ${name}.M1
 
-          ''${blood-elf-0} ''${ENDIAN_FLAG} -f ${name}.M1 -o ${name}-footer.M1
+          ''${blood-elf-0} ${endianFlag} ${bloodFlag} -f ${name}.M1 -o ${name}-footer.M1
 
-          ''${M1} --architecture ''${ARCH} \
-            ''${ENDIAN_FLAG} \
-            -f ''${m2libc}/''${ARCH}/''${ARCH}_defs.M1 \
-            -f ''${m2libc}/''${ARCH}/libc-full.M1 \
+          ''${M1} --architecture ${m2libcArch} \
+            ${endianFlag} \
+            -f ''${m2libc}/${m2libcArch}/${m2libcArch}_defs.M1 \
+            -f ''${m2libc}/${m2libcArch}/libc-full.M1 \
             -f ${name}.M1 \
             -f ${name}-footer.M1 \
             -o ${name}.hex2
 
-          ''${hex2} --architecture ''${ARCH} \
-            ''${ENDIAN_FLAG} \
-            -f ''${m2libc}/''${ARCH}/ELF-''${ARCH}-debug.hex2 \
+          ''${hex2} --architecture ${m2libcArch} \
+            ${endianFlag} \
+            -f ''${m2libc}/${m2libcArch}/ELF-${m2libcArch}-debug.hex2 \
             -f ${name}.hex2 \
-            --base-address ''${BASE_ADDRESS} \
+            --base-address ${baseAddress} \
             -o ''${out}
         '')
       ];
-      inherit version M1 M2 blood-elf-0 hex2 m2libc src ARCH BLOOD_FLAG BASE_ADDRESS ENDIAN_FLAG;
+      inherit version M1 M2 blood-elf-0 hex2 m2libc src;
     };
   mkdir = buildMesccToolsExtraUtil "mkdir";
   cp = buildMesccToolsExtraUtil "cp";
@@ -76,13 +78,13 @@ derivationWithMeta {
     "--file"
     ./build.kaem
   ];
-  inherit version M1 M2 blood-elf-0 hex2 mkdir cp chmod replace m2libc src ARCH BLOOD_FLAG BASE_ADDRESS ENDIAN_FLAG;
+  inherit version M1 M2 blood-elf-0 hex2 mkdir cp chmod replace m2libc src m2libcArch baseAddress bloodFlag endianFlag;
 
   meta = with lib; {
     description = "Collection of tools written for use in bootstrapping";
     homepage = "https://github.com/oriansj/mescc-tools";
     license = licenses.gpl3Plus;
     maintainers = teams.minimal-bootstrap.members;
-    platforms = [ "i686-linux" ];
+    inherit platforms;
   };
 }
diff --git a/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix
new file mode 100644
index 000000000000..c68f7630f3db
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/platforms.nix
@@ -0,0 +1,29 @@
+# Platform specific constants
+{ lib
+, hostPlatform
+}:
+
+rec {
+  # meta.platforms
+  platforms = [
+    "i686-linux"
+    "x86_64-linux"
+  ];
+
+  # system arch as used within the stage0 project
+  stage0Arch = {
+    "i686-linux"   = "x86";
+    "x86_64-linux" = "AMD64";
+  }.${hostPlatform.system} or (throw "Unsupported system: ${hostPlatform.system}");
+
+  # lower-case form is widely used by m2libc
+  m2libcArch = lib.toLower stage0Arch;
+
+  # Passed to M2-Mesoplanet as --operating-system
+  m2libcOS = if hostPlatform.isLinux then "linux" else throw "Unsupported system: ${hostPlatform.system}";
+
+  baseAddress = {
+    "i686-linux"   = "0x08048000";
+    "x86_64-linux" = "0x00600000";
+  }.${hostPlatform.system} or (throw "Unsupported system: ${hostPlatform.system}");
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
index 9595de407cb4..24e0ed5adbb1 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix
@@ -75,6 +75,18 @@ rec {
     url = "https://developer.nvidia.com/downloads/vulkan-beta-${lib.concatStrings (lib.splitString "." version)}-linux";
   };
 
+  # data center driver compatible with current default cudaPackages
+  dc = dc_520;
+  dc_520 = generic rec {
+    version = "520.61.05";
+    url = "https://us.download.nvidia.com/tesla/${version}/NVIDIA-Linux-x86_64-${version}.run";
+    sha256_64bit = "sha256-EPYWZwOur/6iN/otDMrNDpNXr1mzu8cIqQl8lXhQlzU==";
+    fabricmanagerSha256 = "sha256-o8Kbmkg7qczKQclaGvEyXNzEOWq9ZpQZn9syeffnEiE==";
+    useSettings = false;
+    usePersistenced = false;
+    useFabricmanager = true;
+  };
+
   # Update note:
   # If you add a legacy driver here, also update `top-level/linux-kernels.nix`,
   # adding to the `nvidia_x11_legacy*` entries.
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix
new file mode 100644
index 000000000000..58cf8c0e3557
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/fabricmanager.nix
@@ -0,0 +1,47 @@
+nvidia_x11: sha256:
+
+{ stdenv, lib, fetchurl, patchelf }:
+
+let
+  sys = with lib; concatStringsSep "-" (reverseList (splitString "-" stdenv.system));
+  bsys = builtins.replaceStrings ["_"] ["-"] sys;
+  fmver = nvidia_x11.version;
+in
+
+stdenv.mkDerivation rec {
+  pname = "fabricmanager";
+  version = fmver;
+  src = fetchurl {
+    url = "https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/" +
+          "${sys}/${pname}-${sys}-${fmver}-archive.tar.xz";
+    inherit sha256;
+  };
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    find .
+    mkdir -p $out/{bin,share/nvidia-fabricmanager}
+    for bin in nv{-fabricmanager,switch-audit};do
+    ${patchelf}/bin/patchelf \
+      --set-interpreter ${stdenv.cc.libc}/lib/ld-${bsys}.so.2 \
+      --set-rpath ${lib.makeLibraryPath [ stdenv.cc.libc ]} \
+      bin/$bin
+    done
+    mv bin/nv{-fabricmanager,switch-audit} $out/bin/.
+    for d in etc systemd share/nvidia;do
+      mv $d $out/share/nvidia-fabricmanager/.
+    done
+    for d in include lib;do
+      mv $d $out/.
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://www.nvidia.com/object/unix.html";
+    description = "Fabricmanager daemon for NVLink intialization and control";
+    license = licenses.unfreeRedistributable;
+    platforms = nvidia_x11.meta.platforms;
+    mainProgram = "nv-fabricmanager";
+    maintainers = with maintainers; [ edwtjo ];
+  };
+}
diff --git a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix
index 792fda42ca9c..8ec292f27251 100644
--- a/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix
+++ b/nixpkgs/pkgs/os-specific/linux/nvidia-x11/generic.nix
@@ -4,14 +4,19 @@
 , sha256_64bit
 , sha256_aarch64 ? null
 , openSha256 ? null
-, settingsSha256
+, settingsSha256 ? null
 , settingsVersion ? version
-, persistencedSha256
+, persistencedSha256 ? null
 , persistencedVersion ? version
+, fabricmanagerSha256 ? null
+, fabricmanagerVersion ? version
 , useGLVND ? true
 , useProfiles ? true
 , preferGtk2 ? false
 , settings32Bit ? false
+, useSettings ? true
+, usePersistenced ? true
+, useFabricmanager ? false
 , ibtSupport ? false
 
 , prePatch ? ""
@@ -33,14 +38,21 @@
   disable32Bit ? stdenv.hostPlatform.system == "aarch64-linux"
   # 32 bit libs only version of this package
 , lib32 ? null
-  # Whether to extract the GSP firmware
-, firmware ? openSha256 != null
+  # Whether to extract the GSP firmware, datacenter drivers needs to extract the
+  # firmware
+, firmware ? openSha256 != null || useFabricmanager
+  # Whether the user accepts the NVIDIA Software License
+, config, acceptLicense ? config.nvidia.acceptLicense or false
 }:
 
 with lib;
 
 assert !libsOnly -> kernel != null;
 assert versionOlder version "391" -> sha256_32bit != null;
+assert useSettings -> settingsSha256 != null;
+assert usePersistenced -> persistencedSha256 != null;
+assert useFabricmanager -> fabricmanagerSha256 != null;
+assert useFabricmanager -> !(useSettings || usePersistenced);
 
 let
   nameSuffix = optionalString (!libsOnly) "-${kernel.version}";
@@ -54,12 +66,33 @@ let
     dbus # for nvidia-powerd
   ]);
 
+  # maybe silly since we've ignored this previously and just unfree..
+  throwLicense = throw ''
+    Use of NVIDIA Software requires license acceptance of the license:
+
+      - License For Customer Use of NVIDIA Software [1]
+
+    You can express acceptance by setting acceptLicense to true your nixpkgs.config.
+    Example:
+
+      configuration.nix:
+        nixpkgs.config.allowUnfree = true;
+        nixpkgs.config.nvidia.acceptLicense = true;
+
+      config.nix:
+        allowUnfree = true;
+        nvidia.acceptLicense = true;
+
+    [1]: https://www.nvidia.com/content/DriverDownloads/licence.php?lang=us
+  '';
+
   self = stdenv.mkDerivation {
-    name = "nvidia-x11-${version}${nameSuffix}";
+    name = "nvidia-${if useFabricmanager then "dc" else "x11"}-${version}${nameSuffix}";
 
     builder = ./builder.sh;
 
     src =
+      if !acceptLicense && (openSha256 == null) then throwLicense else
       if stdenv.hostPlatform.system == "x86_64-linux" then
         fetchurl {
           urls = if args ? url then [ args.url ] else [
@@ -127,11 +160,17 @@ let
         nvidia_x11 = self;
         broken = brokenOpen;
       }) openSha256;
-      settings = (if settings32Bit then pkgsi686Linux.callPackage else callPackage) (import ./settings.nix self settingsSha256) {
-        withGtk2 = preferGtk2;
-        withGtk3 = !preferGtk2;
-      };
-      persistenced = mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256;
+      settings = if useSettings then
+        (if settings32Bit then pkgsi686Linux.callPackage else callPackage) (import ./settings.nix self settingsSha256) {
+          withGtk2 = preferGtk2;
+          withGtk3 = !preferGtk2;
+        } else {};
+      persistenced = if usePersistenced then
+        mapNullable (hash: callPackage (import ./persistenced.nix self hash) { }) persistencedSha256
+      else {};
+      fabricmanager = if useFabricmanager then
+        mapNullable (hash: callPackage (import ./fabricmanager.nix self hash) { }) fabricmanagerSha256
+      else {};
       inherit persistencedVersion settingsVersion;
       compressFirmware = false;
       ibtSupport = ibtSupport || (lib.versionAtLeast version "530");
@@ -141,12 +180,12 @@ let
 
     meta = with lib; {
       homepage = "https://www.nvidia.com/object/unix.html";
-      description = "X.org driver and kernel module for NVIDIA graphics cards";
+      description = "${if useFabricmanager then "Data Center" else "X.org"} driver and kernel module for NVIDIA cards";
       license = licenses.unfreeRedistributable;
       platforms = [ "x86_64-linux" ]
         ++ optionals (sha256_32bit != null) [ "i686-linux" ]
         ++ optionals (sha256_aarch64 != null) [ "aarch64-linux" ];
-      maintainers = with maintainers; [ jonringer kiskae ];
+      maintainers = with maintainers; [ jonringer kiskae edwtjo ];
       priority = 4; # resolves collision with xorg-server's "lib/xorg/modules/extensions/libglx.so"
       inherit broken;
     };
diff --git a/nixpkgs/pkgs/os-specific/linux/pam_ussh/default.nix b/nixpkgs/pkgs/os-specific/linux/pam_ussh/default.nix
index b0eeef0948e6..028b33bc9316 100644
--- a/nixpkgs/pkgs/os-specific/linux/pam_ussh/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pam_ussh/default.nix
@@ -21,7 +21,7 @@ buildGoModule rec {
     cp ${./go.sum} go.sum
   '';
 
-  vendorSha256 = "sha256-fOIzJuTXiDNJak5ilgI2KnPOCogbFWTlPL3yNQdzUUI=";
+  vendorHash = "sha256-fOIzJuTXiDNJak5ilgI2KnPOCogbFWTlPL3yNQdzUUI=";
 
   buildInputs = [
     pam
diff --git a/nixpkgs/pkgs/os-specific/linux/pflask/default.nix b/nixpkgs/pkgs/os-specific/linux/pflask/default.nix
index 9d7eac8bee1e..1270a9b9494f 100644
--- a/nixpkgs/pkgs/os-specific/linux/pflask/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/pflask/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, python3, waf }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, python3, wafHook }:
 
 stdenv.mkDerivation rec {
   pname = "pflask";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  nativeBuildInputs = [ python3 waf.hook ];
+  nativeBuildInputs = [ python3 wafHook ];
 
   postInstall = ''
     mkdir -p $out/bin
diff --git a/nixpkgs/pkgs/os-specific/linux/psmisc/default.nix b/nixpkgs/pkgs/os-specific/linux/psmisc/default.nix
index 092c75a5837d..f269c9146df4 100644
--- a/nixpkgs/pkgs/os-specific/linux/psmisc/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/psmisc/default.nix
@@ -1,26 +1,23 @@
-{lib, stdenv, fetchFromGitLab, fetchpatch, autoconf, automake, gettext, ncurses}:
+{ lib
+, stdenv
+, fetchFromGitLab
+, autoconf
+, automake
+, gettext
+, ncurses
+}:
 
 stdenv.mkDerivation rec {
   pname = "psmisc";
-  version = "23.5";
+  version = "23.6";
 
   src = fetchFromGitLab {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-02jvRPqN8DS30ID42hQFu400NoFC5QiH5YA3NB+EoFI=";
+    hash = "sha256-TjnOn8a7HAgt11zcM0i5DM5ERmsvLJHvo1e5FOsl6IA=";
   };
 
-  patches = [
-    # Upstream patch to be released in the next version
-    (fetchpatch {
-      name = "fallback-to-kill.diff";
-      url = "https://gitlab.com/psmisc/psmisc/-/commit/6892e321e7042e3df60a5501a1c59d076e8a856f.patch";
-      sha256 = "sha256-3uk1KXEOqAxpHWBORUw5+dR5s/Z55JJs5tuBZlTdjlo=";
-      excludes = [ "ChangeLog" ];
-    })
-  ];
-
   nativeBuildInputs = [ autoconf automake gettext ];
   buildInputs = [ ncurses ];
 
diff --git a/nixpkgs/pkgs/os-specific/linux/uclibc-ng/default.nix b/nixpkgs/pkgs/os-specific/linux/uclibc-ng/default.nix
index b357bc50e584..43c9bbfa8f3f 100644
--- a/nixpkgs/pkgs/os-specific/linux/uclibc-ng/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/uclibc-ng/default.nix
@@ -58,11 +58,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "uclibc-ng";
-  version = "1.0.42";
+  version = "1.0.44";
 
   src = fetchurl {
     url = "https://downloads.uclibc-ng.org/releases/${version}/uClibc-ng-${version}.tar.xz";
-    sha256 = "sha256-7G2uRM6GVYiF5WvDvva9TQgjlxFObh/BV5X3HoBNcBY=";
+    sha256 = "sha256-ffnZh5VYJzgvHCQA2lE0Vr7Ltvhovf03c3Jl8cvuyZQ=";
   };
 
   # 'ftw' needed to build acl, a coreutils dependency
diff --git a/nixpkgs/pkgs/os-specific/linux/ultrablue-server/default.nix b/nixpkgs/pkgs/os-specific/linux/ultrablue-server/default.nix
index 620189af361d..bb162f1693ba 100644
--- a/nixpkgs/pkgs/os-specific/linux/ultrablue-server/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/ultrablue-server/default.nix
@@ -18,7 +18,7 @@ buildGoModule rec {
 
   sourceRoot = "${src.name}/server";
 
-  vendorSha256 = "sha256-249LWguTHIF0HNIo8CsE/HWpAtBw4P46VPvlTARLTpw=";
+  vendorHash = "sha256-249LWguTHIF0HNIo8CsE/HWpAtBw4P46VPvlTARLTpw=";
   doCheck = false;
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
index b9367a68728d..45c0d57cbff4 100644
--- a/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
+++ b/nixpkgs/pkgs/os-specific/linux/util-linux/default.nix
@@ -15,15 +15,16 @@
 , writeSupport ? stdenv.isLinux
 , shadowSupport ? stdenv.isLinux
 , memstreamHook
+, gitUpdater
 }:
 
 stdenv.mkDerivation rec {
   pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal";
-  version = "2.39.1";
+  version = "2.39.2";
 
   src = fetchurl {
     url = "mirror://kernel/linux/utils/util-linux/v${lib.versions.majorMinor version}/util-linux-${version}.tar.xz";
-    hash = "sha256-iQro/4ECR70Z4nTfdug3HSAs2gGtJ3aBsOqI7qoAKGs=";
+    hash = "sha256-h6vfqo5JD4vm3el298gLm1/58wHhtn44meHwWlmhUx8=";
   };
 
   patches = [
@@ -111,6 +112,15 @@ stdenv.mkDerivation rec {
     installShellCompletion --bash bash-completion/*
   '';
 
+  passthru = {
+    updateScript = gitUpdater {
+      # No nicer place to find latest release.
+      url = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git";
+      rev-prefix = "v";
+      ignoredVersions = "(-rc).*";
+    };
+  };
+
   meta = with lib; {
     homepage = "https://www.kernel.org/pub/linux/utils/util-linux/";
     description = "A set of system utilities for Linux";