diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix index b7cf5484c9e9..4295dc213af9 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}"; + badBranchError = + branch: + throw '' + Unknown FreeBSD branch ${branch}! + FreeBSD branches normally look like one of: + * `release/..0` for tagged releases without security updates + * `releng/.` for release update branches with security updates + * `stable/` for stable versions working towards the next minor release + * `main` for the latest development version -in makeScopeWithSplicing' { - otherSplices = generateSplicesForMkScope "freebsd"; - f = (self: lib.packagesFromDirectoryRecursive { - callPackage = self.callPackage; - directory = ./pkgs; - } // { - sourceData = versions.${branch}; + Branches can be selected by overriding the `branch` attribute on the freebsd package set. + ''; - ports = fetchzip { - url = "https://cgit.freebsd.org/ports/snapshot/ports-dde3b2b456c3a4bdd217d0bf3684231cc3724a0a.tar.gz"; - sha256 = "BpHqJfnGOeTE7tkFJBx0Wk8ryalmf4KNTit/Coh026E="; + # `./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; }; - - 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; - }; - - 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 000000000000..609b3f45b51e --- /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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-fix-typedefs-locations.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/compat/compat-install-dirs.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-msun-arch-subdir.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/libc/libc-no-force--lcompiler-rt.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/libnetbsd-do-install.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/libc/librpcsvc-include-subdir.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/include/no-perms-BSD.include.dist.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/rpcgen-glibc-hack.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-gnu-date.patch rename to 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 similarity index 100% rename from pkgs/os-specific/bsd/freebsd/pkgs/sys/sys-no-explicit-intrinsics-dep.patch rename to 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 5e4528fbf46a..d31e3b05427b 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 73fa887c5123..5c6f3ac4a16b 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 0225d44be4c3..935b48cca5e7 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 4011e4d8a649..0deea8b2fb7b 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 56141255af5e..c2e64cb36601 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 ``, 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 # `` 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 81cf4114e873..ab0edbabceab 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 cd20f67148fa..533a871a4b04 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`, 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 736c4c3a3e3c..3f781b4eeaf2 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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3763f28e5211..39a3dcd715e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40885,10 +40885,8 @@ with pkgs; name = "bsd-setup-hook"; } ../os-specific/bsd/setup-hook.sh; - freebsd = callPackage ../os-specific/bsd/freebsd { }; - freebsdCross = callPackage ../os-specific/bsd/freebsd { - stdenv = crossLibcStdenv; - }; + inherit (callPackage ../os-specific/bsd/freebsd { }) + freebsd freebsdCross; netbsd = callPackage ../os-specific/bsd/netbsd { }; netbsdCross = callPackage ../os-specific/bsd/netbsd { diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix index cd48453fa0ee..a80b40d36060 100644 --- a/pkgs/top-level/release-attrpaths-superset.nix +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -76,6 +76,7 @@ let buildHaskellPackages = true; buildPackages = true; + buildFreebsd = true; generateOptparseApplicativeCompletions = true; callPackage = true; diff --git a/pkgs/top-level/splice.nix b/pkgs/top-level/splice.nix index 9ac0fe2200f9..c477d797795a 100644 --- a/pkgs/top-level/splice.nix +++ b/pkgs/top-level/splice.nix @@ -148,17 +148,23 @@ in makeScopeWithSplicing' = lib.makeScopeWithSplicing' { inherit splicePackages; inherit (pkgs) newScope; }; # generate 'otherSplices' for 'makeScopeWithSplicing' - generateSplicesForMkScope = attr: + generateSplicesForMkScope = attrs: let - split = X: lib.splitString "." "${X}.${attr}"; + split = X: [ X ] ++ ( + if builtins.isList attrs + then attrs + else if builtins.isString attrs + then lib.splitString "." attrs + else throw "generateSplicesForMkScope must be passed a list of string or string" + ); + bad = throw "attribute should be found"; in { - # nulls should never be reached - selfBuildBuild = lib.attrByPath (split "pkgsBuildBuild") null pkgs; - selfBuildHost = lib.attrByPath (split "pkgsBuildHost") null pkgs; - selfBuildTarget = lib.attrByPath (split "pkgsBuildTarget") null pkgs; - selfHostHost = lib.attrByPath (split "pkgsHostHost") null pkgs; - selfHostTarget = lib.attrByPath (split "pkgsHostTarget") null pkgs; + selfBuildBuild = lib.attrByPath (split "pkgsBuildBuild") bad pkgs; + selfBuildHost = lib.attrByPath (split "pkgsBuildHost") bad pkgs; + selfBuildTarget = lib.attrByPath (split "pkgsBuildTarget") bad pkgs; + selfHostHost = lib.attrByPath (split "pkgsHostHost") bad pkgs; + selfHostTarget = lib.attrByPath (split "pkgsHostTarget") bad pkgs; selfTargetTarget = lib.attrByPath (split "pkgsTargetTarget") { } pkgs; };