about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2024-05-05 14:20:07 +0200
committerJan Tojnar <jtojnar@gmail.com>2024-05-05 14:50:32 +0200
commit100509c030faf7cca1582c5a7197b8d3a815d600 (patch)
treed55f8944fd90a3dd0d86e0f495f3d0bbdf795060 /pkgs/os-specific
parent5434ca3ba0d0db2de14cfb9a0818ea8718f696ad (diff)
parent5dc079ed333c755fe000f2b86e97bf11f6f069a4 (diff)
Merge branch 'staging-next' into staging
Conflicts in luaPackages.luarocks-nix:

- 8b563cd9f923cdf009b3864a358d912103703320 switched to the new version format (prefixed by 0 since there was no relevant last tag in the branch).
  bc4f6fa54321533b250984f7b3813f8d343dfde1 bumped version and switched to the new version format. But the tag used is not part of the branch the commit comes from (master).

  Used the new version but replaced the tag prefix with 0.

- b73ec84b9eed8de7e9095e779ee3d4066ceb091e removed meta (it is already set in the overridden luarocks). But that would cause the update script to try to update the overridden luarocks (as did the previously used old.meta).
  bf311d950e4c5d65fae66717c7c3d4f085ff6415 modified meta to fix the update script properly.

  Kept the meta from the latter since it allows update script to work.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/bsd/freebsd/default.nix122
-rw-r--r--pkgs/os-specific/bsd/freebsd/package-set.nix71
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/compat-fix-typedefs-locations.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-fix-typedefs-locations.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-install-dirs.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/libc-msun-arch-subdir.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-msun-arch-subdir.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/libc-no-force--lcompiler-rt.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-no-force--lcompiler-rt.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/libnetbsd-do-install.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/libnetbsd-do-install.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/librpcsvc-include-subdir.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/libc/librpcsvc-include-subdir.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/no-perms-BSD.include.dist.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/include/no-perms-BSD.include.dist.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/rpcgen-glibc-hack.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/rpcgen-glibc-hack.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/sys-gnu-date.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-gnu-date.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/patches/13.1/sys-no-explicit-intrinsics-dep.patch (renamed from pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-no-explicit-intrinsics-dep.patch)0
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix6
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix4
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix7
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix6
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix6
-rw-r--r--pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix6
-rwxr-xr-xpkgs/os-specific/bsd/freebsd/update.py22
-rw-r--r--pkgs/os-specific/bsd/freebsd/versions.json59
-rw-r--r--pkgs/os-specific/linux/rtl8852au/default.nix6
-rw-r--r--pkgs/os-specific/linux/uhk-agent/default.nix4
22 files changed, 212 insertions, 107 deletions
diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix
index b7cf5484c9e94..4295dc213af9d 100644
--- a/pkgs/os-specific/bsd/freebsd/default.nix
+++ b/pkgs/os-specific/bsd/freebsd/default.nix
@@ -1,72 +1,64 @@
-{ stdenv, lib, stdenvNoCC
-, makeScopeWithSplicing', generateSplicesForMkScope
-, buildPackages
-, fetchgit, fetchzip
+{
+  lib,
+  makeScopeWithSplicing',
+  generateSplicesForMkScope,
+  callPackage,
+  crossLibcStdenv,
+  attributePathToSplice ? [ "freebsd" ],
+  branch ? "release/13.1.0",
 }:
 
 let
-  inherit (buildPackages.buildPackages) rsync;
-
   versions = builtins.fromJSON (builtins.readFile ./versions.json);
 
-  version = "13.1.0";
-  branch = "release/${version}";
-
-in makeScopeWithSplicing' {
-  otherSplices = generateSplicesForMkScope "freebsd";
-  f = (self: lib.packagesFromDirectoryRecursive {
-    callPackage = self.callPackage;
-    directory = ./pkgs;
-  } // {
-    sourceData = versions.${branch};
-
-    ports = fetchzip {
-      url = "https://cgit.freebsd.org/ports/snapshot/ports-dde3b2b456c3a4bdd217d0bf3684231cc3724a0a.tar.gz";
-      sha256 = "BpHqJfnGOeTE7tkFJBx0Wk8ryalmf4KNTit/Coh026E=";
-    };
-
-    compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isFreeBSD) self.compat;
-    freebsd-lib = import ./lib { inherit version; };
-
-    # The manual callPackages below should in principle be unnecessary, but are
-    # necessary. See note in ../netbsd/default.nix
-
-    compat = self.callPackage ./pkgs/compat/package.nix {
-      inherit stdenv;
-      inherit (buildPackages.freebsd) makeMinimal boot-install;
-    };
-
-    csu = self.callPackage ./pkgs/csu.nix {
-      inherit (buildPackages.freebsd) makeMinimal install gencat;
-      inherit (self) include;
-    };
-
-    include = self.callPackage ./pkgs/include/package.nix {
-      inherit (buildPackages.freebsd) makeMinimal install rpcgen;
+  badBranchError =
+    branch:
+    throw ''
+      Unknown FreeBSD branch ${branch}!
+      FreeBSD branches normally look like one of:
+      * `release/<major>.<minor>.0` for tagged releases without security updates
+      * `releng/<major>.<minor>` for release update branches with security updates
+      * `stable/<major>` for stable versions working towards the next minor release
+      * `main` for the latest development version
+
+      Branches can be selected by overriding the `branch` attribute on the freebsd package set.
+    '';
+
+  # `./package-set.nix` should never know the name of the package set we
+  # are constructing; just this function is allowed to know that. This
+  # is why we:
+  #
+  #  - do the splicing for cross compilation here
+  #
+  #  - construct the *anonymized* `buildFreebsd` attribute to be passed
+  #    to `./package-set.nix`.
+  callFreeBSDWithAttrs =
+    extraArgs:
+    let
+      # we do not include the branch in the splice here because the branch
+      # parameter to this file will only ever take on one value - more values
+      # are provided through overrides.
+      otherSplices = generateSplicesForMkScope attributePathToSplice;
+    in
+    makeScopeWithSplicing' {
+      inherit otherSplices;
+      f =
+        self:
+        {
+          inherit branch;
+        }
+        // callPackage ./package-set.nix (
+          {
+            sourceData = versions.${self.branch} or (throw (badBranchError self.branch));
+            versionData = self.sourceData.version;
+            buildFreebsd = otherSplices.selfBuildHost;
+            patchesRoot = ./patches/${self.versionData.revision};
+          }
+          // extraArgs
+        ) self;
     };
-
-    install = self.callPackage ./pkgs/install.nix {
-      inherit (buildPackages.freebsd) makeMinimal;
-      inherit (self) mtree libnetbsd;
-    };
-
-    libc = self.callPackage ./pkgs/libc/package.nix {
-      inherit (buildPackages.freebsd) makeMinimal install gencat rpcgen;
-      inherit (self) csu include;
-    };
-
-    libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix {
-      inherit (buildPackages.freebsd) makeMinimal;
-    };
-
-    mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
-      inherit stdenv;
-      inherit (buildPackages.freebsd) makeMinimal install tsort;
-    };
-
-    makeMinimal = self.callPackage ./pkgs/makeMinimal.nix {
-      inherit (self) make;
-    };
-
-  });
+in
+{
+  freebsd = callFreeBSDWithAttrs { };
+  freebsdCross = callFreeBSDWithAttrs { stdenv = crossLibcStdenv; };
 }
diff --git a/pkgs/os-specific/bsd/freebsd/package-set.nix b/pkgs/os-specific/bsd/freebsd/package-set.nix
new file mode 100644
index 0000000000000..609b3f45b51e6
--- /dev/null
+++ b/pkgs/os-specific/bsd/freebsd/package-set.nix
@@ -0,0 +1,71 @@
+{ stdenv, lib, stdenvNoCC
+, fetchzip
+, sourceData, versionData, buildFreebsd, patchesRoot
+}:
+
+self:
+
+lib.packagesFromDirectoryRecursive {
+  callPackage = self.callPackage;
+  directory = ./pkgs;
+} // {
+  inherit sourceData patchesRoot versionData;
+
+  # Keep the crawled portion of Nixpkgs finite.
+  buildFreebsd = lib.dontRecurseIntoAttrs buildFreebsd;
+
+  ports = fetchzip {
+    url = "https://cgit.freebsd.org/ports/snapshot/ports-dde3b2b456c3a4bdd217d0bf3684231cc3724a0a.tar.gz";
+    sha256 = "BpHqJfnGOeTE7tkFJBx0Wk8ryalmf4KNTit/Coh026E=";
+  };
+
+  compatIfNeeded = lib.optional (!stdenvNoCC.hostPlatform.isFreeBSD) self.compat;
+  freebsd-lib = import ./lib {
+    version = lib.concatStringsSep "." (map toString (lib.filter (x: x != null) [
+      self.versionData.major
+      self.versionData.minor
+      self.versionData.patch or null
+    ]));
+  };
+
+  # The manual callPackages below should in principle be unnecessary, but are
+  # necessary. See note in ../netbsd/default.nix
+
+  compat = self.callPackage ./pkgs/compat/package.nix {
+    inherit stdenv;
+    inherit (buildFreebsd) makeMinimal boot-install;
+  };
+
+  csu = self.callPackage ./pkgs/csu.nix {
+    inherit (buildFreebsd) makeMinimal install gencat;
+    inherit (self) include;
+  };
+
+  include = self.callPackage ./pkgs/include/package.nix {
+    inherit (buildFreebsd) makeMinimal install rpcgen;
+  };
+
+  install = self.callPackage ./pkgs/install.nix {
+    inherit (buildFreebsd) makeMinimal;
+    inherit (self) mtree libnetbsd;
+  };
+
+  libc = self.callPackage ./pkgs/libc/package.nix {
+    inherit (buildFreebsd) makeMinimal install gencat rpcgen;
+    inherit (self) csu include;
+  };
+
+  libnetbsd = self.callPackage ./pkgs/libnetbsd/package.nix {
+    inherit (buildFreebsd) makeMinimal;
+  };
+
+  mkDerivation = self.callPackage ./pkgs/mkDerivation.nix {
+    inherit stdenv;
+    inherit (buildFreebsd) makeMinimal install tsort;
+  };
+
+  makeMinimal = self.callPackage ./pkgs/makeMinimal.nix {
+    inherit (self) make;
+  };
+
+}
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-fix-typedefs-locations.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-fix-typedefs-locations.patch
index 3336a2504e584..3336a2504e584 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-fix-typedefs-locations.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-fix-typedefs-locations.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-install-dirs.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch
index 9bb2bea32ee98..9bb2bea32ee98 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-install-dirs.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/compat-install-dirs.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-msun-arch-subdir.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/libc-msun-arch-subdir.patch
index 4a69e85a986a0..4a69e85a986a0 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-msun-arch-subdir.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/libc-msun-arch-subdir.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-no-force--lcompiler-rt.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/libc-no-force--lcompiler-rt.patch
index 60176fb73cf76..60176fb73cf76 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-no-force--lcompiler-rt.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/libc-no-force--lcompiler-rt.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/libnetbsd-do-install.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/libnetbsd-do-install.patch
index a7bd032d2be54..a7bd032d2be54 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/libnetbsd-do-install.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/libnetbsd-do-install.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/librpcsvc-include-subdir.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/librpcsvc-include-subdir.patch
index 38e06682869fb..38e06682869fb 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/librpcsvc-include-subdir.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/librpcsvc-include-subdir.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/include/no-perms-BSD.include.dist.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/no-perms-BSD.include.dist.patch
index 985617ee0f457..985617ee0f457 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/include/no-perms-BSD.include.dist.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/no-perms-BSD.include.dist.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/rpcgen-glibc-hack.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/rpcgen-glibc-hack.patch
index 3dde1a0106514..3dde1a0106514 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/rpcgen-glibc-hack.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/rpcgen-glibc-hack.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-gnu-date.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/sys-gnu-date.patch
index 2356446baf853..2356446baf853 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-gnu-date.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/sys-gnu-date.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-no-explicit-intrinsics-dep.patch b/pkgs/os-specific/bsd/freebsd/patches/13.1/sys-no-explicit-intrinsics-dep.patch
index edf44de5bb0d7..edf44de5bb0d7 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-no-explicit-intrinsics-dep.patch
+++ b/pkgs/os-specific/bsd/freebsd/patches/13.1/sys-no-explicit-intrinsics-dep.patch
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix
index 5e4528fbf46a1..d31e3b05427bb 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, mkDerivation
+{ lib, stdenv, mkDerivation, patchesRoot
 , bsdSetupHook, freebsdSetupHook
 , makeMinimal, boot-install
 , which
@@ -85,8 +85,8 @@ mkDerivation rec {
   ];
 
   patches = [
-    ./compat-install-dirs.patch
-    ./compat-fix-typedefs-locations.patch
+    /${patchesRoot}/compat-install-dirs.patch
+    /${patchesRoot}/compat-fix-typedefs-locations.patch
   ];
 
   preBuild = ''
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix
index 73fa887c51231..5c6f3ac4a16b6 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix
@@ -1,4 +1,4 @@
-{ lib, mkDerivation
+{ lib, mkDerivation, patchesRoot
 , buildPackages
 , bsdSetupHook, freebsdSetupHook
 , makeMinimal
@@ -26,7 +26,7 @@ mkDerivation {
   ];
 
   patches = [
-    ./no-perms-BSD.include.dist.patch
+    /${patchesRoot}/no-perms-BSD.include.dist.patch
   ];
 
   # The makefiles define INCSDIR per subdirectory, so we have to set
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix
index 0225d44be4c3b..935b48cca5e72 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, mkDerivation
+, patchesRoot
 
 , bsdSetupHook, freebsdSetupHook
 , makeMinimal
@@ -48,13 +49,13 @@ mkDerivation rec {
 
   patches = [
     # Hack around broken propogating MAKEFLAGS to submake, just inline logic
-    ./libc-msun-arch-subdir.patch
+    /${patchesRoot}/libc-msun-arch-subdir.patch
 
     # Don't force -lcompiler-rt, we don't actually call it that
-    ./libc-no-force--lcompiler-rt.patch
+    /${patchesRoot}/libc-no-force--lcompiler-rt.patch
 
     # Fix extra include dir to get rpcsvc headers.
-    ./librpcsvc-include-subdir.patch
+    /${patchesRoot}/librpcsvc-include-subdir.patch
   ];
 
   postPatch = ''
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix
index 4011e4d8a6490..0deea8b2fb7b8 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix
@@ -1,5 +1,5 @@
 { lib, stdenv
-, mkDerivation
+, mkDerivation, patchesRoot
 , bsdSetupHook, freebsdSetupHook, makeMinimal, mandoc, groff
 , boot-install, install
 , compatIfNeeded
@@ -15,8 +15,8 @@ mkDerivation {
      else install)
   ];
   patches = lib.optionals (!stdenv.hostPlatform.isFreeBSD) [
-    ./libnetbsd-do-install.patch
-    #./libnetbsd-define-__va_list.patch
+    /${patchesRoot}/libnetbsd-do-install.patch
+    #/${patchesRoot}/libnetbsd-define-__va_list.patch
   ];
   makeFlags = [
     "STRIP=-s" # flag to install, not command
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix
index 56141255af5e1..c2e64cb36601f 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix
@@ -1,4 +1,4 @@
-{ lib, mkDerivation, stdenv }:
+{ lib, mkDerivation, stdenv, patchesRoot }:
 
 mkDerivation rec {
   path = "usr.bin/rpcgen";
@@ -12,11 +12,11 @@ mkDerivation rec {
     # those headers ends up included other headers...which ends up
     # including the other one, this means by the first time we reach
     # `#include `<bits/waitflags.h>`, both `_SYS_WAIT_H` and
-    # `_STDLIB_H` are already defined! Thus, we never ned up including
+    # `_STDLIB_H` are already defined! Thus, we never end up including
     # `<bits/waitflags.h>` and defining `WUNTRACED`.
     #
     # This hacks around this by manually including `WUNTRACED` until
     # the problem is fixed properly in glibc.
-    ./rpcgen-glibc-hack.patch
+    /${patchesRoot}/rpcgen-glibc-hack.patch
   ];
 }
diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix b/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix
index 81cf4114e8737..ab0edbabceab9 100644
--- a/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix
+++ b/pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, mkDerivation, freebsd-lib
+{ stdenv, mkDerivation, freebsd-lib, patchesRoot
 , buildPackages
 , bsdSetupHook, freebsdSetupHook
 , makeMinimal, install, mandoc, groff
@@ -19,8 +19,8 @@ in rec {
   ];
 
   patches = [
-    ./sys-gnu-date.patch
-    ./sys-no-explicit-intrinsics-dep.patch
+    /${patchesRoot}/sys-gnu-date.patch
+    /${patchesRoot}/sys-no-explicit-intrinsics-dep.patch
   ];
 
   # --dynamic-linker /red/herring is used when building the kernel.
diff --git a/pkgs/os-specific/bsd/freebsd/update.py b/pkgs/os-specific/bsd/freebsd/update.py
index cd20f67148fa7..533a871a4b04d 100755
--- a/pkgs/os-specific/bsd/freebsd/update.py
+++ b/pkgs/os-specific/bsd/freebsd/update.py
@@ -16,6 +16,7 @@ import typing
 import urllib.request
 
 _QUERY_VERSION_PATTERN = re.compile('^([A-Z]+)="(.+)"$')
+_RELEASE_PATCH_PATTERN = re.compile('^RELEASE-p([0-9]+)$')
 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
 MIN_VERSION = packaging.version.Version("13.0.0")
 MAIN_BRANCH = "main"
@@ -60,7 +61,16 @@ def query_version(repo: git.Repo) -> dict[str, typing.Any]:
             continue
         fields[m[1].lower()] = m[2]
 
-    fields["major"] = packaging.version.parse(fields["revision"]).major
+    parsed = packaging.version.parse(fields["revision"])
+    fields["major"] = parsed.major
+    fields["minor"] = parsed.minor
+
+    # Extract the patch number from `RELAESE-p<patch>`, which is used
+    # e.g. in the "releng" branches.
+    m = _RELEASE_PATCH_PATTERN.match(fields["branch"])
+    if m is not None:
+        fields["patch"] = m[1]
+
     return fields
 
 
@@ -95,7 +105,7 @@ def handle_commit(
         "ref": ref_name,
         "refType": ref_type,
         "supported": ref_name in supported_refs,
-        "version": query_version(repo),
+        "version": version,
     }
 
 
@@ -151,6 +161,14 @@ def main() -> None:
         result = handle_commit(
             repo, tag.commit, tag.name, "tag", supported_refs, old_versions
         )
+
+        # Hack in the patch version from parsing the tag, if we didn't
+        # get one from the "branch" field (from newvers). This is
+        # probably 0.
+        versionObj = result["version"]
+        if "patch" not in versionObj:
+            versionObj["patch"] = version.micro
+
         versions[tag.name] = result
 
     for branch in repo.remote("origin").refs:
diff --git a/pkgs/os-specific/bsd/freebsd/versions.json b/pkgs/os-specific/bsd/freebsd/versions.json
index 736c4c3a3e3c1..3f781b4eeaf23 100644
--- a/pkgs/os-specific/bsd/freebsd/versions.json
+++ b/pkgs/os-specific/bsd/freebsd/versions.json
@@ -1,14 +1,15 @@
 {
   "main": {
-    "hash": "sha256-C5ucT9BK/eK8a9HNSDDi8S1uhpPmiqV22XEooxAqbPw=",
+    "hash": "sha256-3aUsD2yRqVvb12z2XPmhE5/u4d9bqyD2ZHH3xNmwYwU=",
     "ref": "main",
     "refType": "branch",
-    "rev": "125c4560bc70971b950d035cfcd2255b89984011",
+    "rev": "aa34b1d20e44141749ffdecf16908fc1e5db4db6",
     "supported": false,
     "version": {
       "branch": "CURRENT",
       "major": 15,
-      "reldate": "1500017",
+      "minor": 0,
+      "reldate": "1500018",
       "release": "15.0-CURRENT",
       "revision": "15.0",
       "type": "FreeBSD",
@@ -24,6 +25,8 @@
     "version": {
       "branch": "RELEASE",
       "major": 13,
+      "minor": 0,
+      "patch": 0,
       "reldate": "1300139",
       "release": "13.0-RELEASE",
       "revision": "13.0",
@@ -40,6 +43,8 @@
     "version": {
       "branch": "RELEASE",
       "major": 13,
+      "minor": 1,
+      "patch": 0,
       "reldate": "1301000",
       "release": "13.1-RELEASE",
       "revision": "13.1",
@@ -56,6 +61,8 @@
     "version": {
       "branch": "RELEASE",
       "major": 13,
+      "minor": 2,
+      "patch": 0,
       "reldate": "1302001",
       "release": "13.2-RELEASE",
       "revision": "13.2",
@@ -72,6 +79,8 @@
     "version": {
       "branch": "RELEASE",
       "major": 13,
+      "minor": 3,
+      "patch": 0,
       "reldate": "1303001",
       "release": "13.3-RELEASE",
       "revision": "13.3",
@@ -88,6 +97,8 @@
     "version": {
       "branch": "RELEASE",
       "major": 14,
+      "minor": 0,
+      "patch": 0,
       "reldate": "1400097",
       "release": "14.0-RELEASE",
       "revision": "14.0",
@@ -104,6 +115,8 @@
     "version": {
       "branch": "RELEASE-p13",
       "major": 13,
+      "minor": 0,
+      "patch": "13",
       "reldate": "1300139",
       "release": "13.0-RELEASE-p13",
       "revision": "13.0",
@@ -120,6 +133,8 @@
     "version": {
       "branch": "RELEASE-p9",
       "major": 13,
+      "minor": 1,
+      "patch": "9",
       "reldate": "1301000",
       "release": "13.1-RELEASE-p9",
       "revision": "13.1",
@@ -136,6 +151,8 @@
     "version": {
       "branch": "RELEASE-p11",
       "major": 13,
+      "minor": 2,
+      "patch": "11",
       "reldate": "1302001",
       "release": "13.2-RELEASE-p11",
       "revision": "13.2",
@@ -144,19 +161,21 @@
     }
   },
   "releng/13.3": {
-    "hash": "sha256-huzUiMZHfyK/mgLD3hW+DaSGgAaTUIuM51xDp+IE3qE=",
+    "hash": "sha256-g3i9q9XihesdfQxGy3oC7IMGtbWaLNwFlNzbdvS/4ng=",
     "ref": "releng/13.3",
     "refType": "branch",
-    "rev": "7a0d63c9093222938f26cd63ff742e555168de77",
+    "rev": "be4f1894ef399f421bab451e8cf8557e27e5a948",
     "supported": true,
     "version": {
-      "branch": "RELEASE-p1",
+      "branch": "RELEASE-p2",
       "major": 13,
+      "minor": 3,
+      "patch": "2",
       "reldate": "1303001",
-      "release": "13.3-RELEASE-p1",
+      "release": "13.3-RELEASE-p2",
       "revision": "13.3",
       "type": "FreeBSD",
-      "version": "FreeBSD 13.3-RELEASE-p1"
+      "version": "FreeBSD 13.3-RELEASE-p2"
     }
   },
   "releng/14.0": {
@@ -168,6 +187,8 @@
     "version": {
       "branch": "RELEASE-p6",
       "major": 14,
+      "minor": 0,
+      "patch": "6",
       "reldate": "1400097",
       "release": "14.0-RELEASE-p6",
       "revision": "14.0",
@@ -176,15 +197,16 @@
     }
   },
   "stable/13": {
-    "hash": "sha256-XateLKKs2A/HCP9Lx/nBm1cybB3otrbeXQvyCL40S0M=",
+    "hash": "sha256-ItC8haDdxMSZt1thpCrn8p0xxvs7Uqh/uNo1OwMalj8=",
     "ref": "stable/13",
     "refType": "branch",
-    "rev": "e0a58ef24a3baf5ed4cc09a798b9fe2d85408052",
+    "rev": "825cb4c850f2b97cfd1b24ed421d7938bf37eee7",
     "supported": true,
     "version": {
       "branch": "STABLE",
       "major": 13,
-      "reldate": "1303502",
+      "minor": 3,
+      "reldate": "1303503",
       "release": "13.3-STABLE",
       "revision": "13.3",
       "type": "FreeBSD",
@@ -192,19 +214,20 @@
     }
   },
   "stable/14": {
-    "hash": "sha256-tIKnK/SYBDk9UnE5AfhjeDpqHnzspYbor0678ye/mrs=",
+    "hash": "sha256-iAj75IXJi4Oium6BqFvsyQipDP2crBZIGg0Dac8Zf1g=",
     "ref": "stable/14",
     "refType": "branch",
-    "rev": "ab872ab0bf195e872ed8d955aab3b2a537a230cd",
+    "rev": "a3b8266f5420601e231bc08c5402d9a4929fbdc0",
     "supported": true,
     "version": {
-      "branch": "STABLE",
+      "branch": "PRERELEASE",
       "major": 14,
-      "reldate": "1400510",
-      "release": "14.0-STABLE",
-      "revision": "14.0",
+      "minor": 1,
+      "reldate": "1400511",
+      "release": "14.1-PRERELEASE",
+      "revision": "14.1",
       "type": "FreeBSD",
-      "version": "FreeBSD 14.0-STABLE"
+      "version": "FreeBSD 14.1-PRERELEASE"
     }
   }
 }
diff --git a/pkgs/os-specific/linux/rtl8852au/default.nix b/pkgs/os-specific/linux/rtl8852au/default.nix
index d154fbe86a208..e7b682893f855 100644
--- a/pkgs/os-specific/linux/rtl8852au/default.nix
+++ b/pkgs/os-specific/linux/rtl8852au/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation {
   pname = "rtl8852au";
-  version = "${kernel.version}-unstable-2023-11-24";
+  version = "${kernel.version}-unstable-2024-04-16";
 
   src = fetchFromGitHub {
     owner = "lwfinger";
     repo = "rtl8852au";
-    rev = "70bdde265b9ab002daf11d4bea1a42baa8da4325";
-    hash = "sha256-6ARS7/0iKYajpMH+f+jWDxIkPY9ZixJkk864oKom4l4=";
+    rev = "5894bc6fed2bcaa525d13fcee1edada8aba67f2b";
+    hash = "sha256-R4Yb/jbh3nMgM41ByFjtkCMbsh/mmMRJ7CcvCRUvKu8=";
   };
 
   nativeBuildInputs = [ bc nukeReferences ] ++ kernel.moduleBuildDependencies;
diff --git a/pkgs/os-specific/linux/uhk-agent/default.nix b/pkgs/os-specific/linux/uhk-agent/default.nix
index 0d6b3ccd515ca..553e471faaffa 100644
--- a/pkgs/os-specific/linux/uhk-agent/default.nix
+++ b/pkgs/os-specific/linux/uhk-agent/default.nix
@@ -12,12 +12,12 @@
 
 let
   pname = "uhk-agent";
-  version = "4.0.2";
+  version = "4.1.0";
 
   src = fetchurl {
     url = "https://github.com/UltimateHackingKeyboard/agent/releases/download/v${version}/UHK.Agent-${version}-linux-x86_64.AppImage";
     name = "${pname}-${version}.AppImage";
-    sha256 = "sha256-yx5hOmb1la+vNh8x0PM3edcMn4ojdwzNmGBUg/BH7wE=";
+    sha256 = "sha256-5VzUSuq+yc8HXSILMg24w/hbwasf4jq0H0wte9Mw+nY=";
   };
 
   appimageContents = appimageTools.extract {