From 944b1056a646b1c58683dfdd4aaef40c5a4ca44c Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 30 Apr 2024 12:05:33 -0400 Subject: [PATCH 1/6] generateSplicesForMkScope: Support dot in attribute path Only the list form supports the full domain of possible attribute names. --- pkgs/top-level/splice.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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; }; From 8bbf167e3ba74e7c98178be14f7397e281d78801 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 30 Apr 2024 19:14:30 -0400 Subject: [PATCH 2/6] freebsd: Include more version info and update We want to know the minor versions. We want to know the patch versions too, where possible. We get those either from the branch when it is the form `RELEASE-p`, or from the tag when its in the form `release/..`. --- pkgs/os-specific/bsd/freebsd/update.py | 22 +++++++- pkgs/os-specific/bsd/freebsd/versions.json | 59 +++++++++++++++------- 2 files changed, 61 insertions(+), 20 deletions(-) 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" } } } From b64a9bb1a9b70726a5ee9fe1cd5daba0eef8cadf Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 30 Apr 2024 19:29:38 -0400 Subject: [PATCH 3/6] freebsdBranches{,Cross}: Init This creates multiple package sets for different versions. The other versions don't yet work, but that will be fixed in subsequent PRs. Push versionData into package set so that it can be overridden Co-Authored-By: Audrey Dutcher Co-Authored-By: Artemis Tosini --- .../bsd/freebsd/default-branch.nix | 39 ++++++++++ pkgs/os-specific/bsd/freebsd/default.nix | 72 ------------------- pkgs/os-specific/bsd/freebsd/package-set.nix | 71 ++++++++++++++++++ pkgs/os-specific/bsd/freebsd/versions.nix | 45 ++++++++++++ pkgs/top-level/all-packages.nix | 14 ++-- pkgs/top-level/config.nix | 8 +++ pkgs/top-level/release-attrpaths-superset.nix | 1 + 7 files changed, 174 insertions(+), 76 deletions(-) create mode 100644 pkgs/os-specific/bsd/freebsd/default-branch.nix delete mode 100644 pkgs/os-specific/bsd/freebsd/default.nix create mode 100644 pkgs/os-specific/bsd/freebsd/package-set.nix create mode 100644 pkgs/os-specific/bsd/freebsd/versions.nix diff --git a/pkgs/os-specific/bsd/freebsd/default-branch.nix b/pkgs/os-specific/bsd/freebsd/default-branch.nix new file mode 100644 index 000000000000..df13357aca41 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/default-branch.nix @@ -0,0 +1,39 @@ +{ + lib, + config, + freebsdBranches, + freebsdBranchesCross, +}: + +let + branch = + let + fallbackBranch = "release/13.1.0"; + envBranch = builtins.getEnv "NIXPKGS_FREEBSD_BRANCH"; + selectedBranch = + if config.freebsdBranch != null then + config.freebsdBranch + else if envBranch != "" then + envBranch + else + null; + chosenBranch = if selectedBranch != null then selectedBranch else fallbackBranch; + in + if freebsdBranches ? ${chosenBranch} then + chosenBranch + else + throw '' + Unknown FreeBSD branch ${chosenBranch}! + 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 + + Set one with the NIXPKGS_FREEBSD_BRANCH environment variable or by setting `nixpkgs.config.freebsdBranch`. + ''; +in +{ + freebsd = freebsdBranches.${branch}; + freebsdCross = freebsdBranchesCross.${branch}; +} diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix deleted file mode 100644 index b7cf5484c9e9..000000000000 --- a/pkgs/os-specific/bsd/freebsd/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ stdenv, lib, stdenvNoCC -, makeScopeWithSplicing', generateSplicesForMkScope -, buildPackages -, fetchgit, fetchzip -}: - -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; - }; - - 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; - }; - - }); -} 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..363e6693b93e --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/package-set.nix @@ -0,0 +1,71 @@ +{ stdenv, lib, stdenvNoCC +, fetchzip +, sourceData, versionData, buildFreebsd +}: + +self: + +lib.packagesFromDirectoryRecursive { + callPackage = self.callPackage; + directory = ./pkgs; +} // { + inherit sourceData 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/versions.nix b/pkgs/os-specific/bsd/freebsd/versions.nix new file mode 100644 index 000000000000..4acfd5b6198b --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/versions.nix @@ -0,0 +1,45 @@ +{ + lib, + config, + makeScopeWithSplicing', + generateSplicesForMkScope, + callPackage, + crossLibcStdenv, +}: + +let + versions = builtins.fromJSON (builtins.readFile ./versions.json); + + # `./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: branch: sourceData: + let + otherSplices = generateSplicesForMkScope [ + "freebsdBranches" + branch + ]; + in + makeScopeWithSplicing' { + inherit otherSplices; + f = callPackage ./package-set.nix ( + { + buildFreebsd = otherSplices.selfBuildHost; + inherit sourceData; + versionData = sourceData.version; + } + // extraArgs + ); + }; +in +{ + freebsdBranches = lib.mapAttrs (callFreeBSDWithAttrs { }) versions; + + freebsdBranchesCross = lib.mapAttrs (callFreeBSDWithAttrs { stdenv = crossLibcStdenv; }) versions; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5c97ea86188b..8ded19f002d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40910,10 +40910,16 @@ 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/versions.nix {}) freebsdBranches freebsdBranchesCross; + + freebsd13 = freebsdBranches."release/13.2.0"; + freebsd14 = freebsdBranches."release/14.0.0"; + freebsdGit = freebsdBranches.main; + freebsd13Cross = freebsdBranchesCross."release/13.0.0"; + freebsd14Cross = freebsdBranchesCross."release/14.0.0"; + freebsdGitCross = freebsdBranchesCross.main; + + inherit (callPackage ../os-specific/bsd/freebsd/default-branch.nix {}) freebsd freebsdCross; netbsd = callPackage ../os-specific/bsd/netbsd { }; netbsdCross = callPackage ../os-specific/bsd/netbsd { diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 67a9a60dbaea..4a5b12ed70db 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -74,6 +74,14 @@ let feature = "set `__contentAddressed` to true by default"; }; + freebsdBranch = mkMassRebuild { + type = types.nullOr types.str; + default = null; + description = '' + Default FreeBSD release to use for FreeBSD packages + ''; + }; + allowAliases = mkOption { type = types.bool; default = true; 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; From da9c1825bc49c2580f08b3a3d88db79bdbc63539 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Wed, 1 May 2024 09:37:04 -0700 Subject: [PATCH 4/6] freebsd/{pkgs,patches}: Move patches to version-dependent patches dir --- pkgs/os-specific/bsd/freebsd/package-set.nix | 4 ++-- .../13.1}/compat-fix-typedefs-locations.patch | 0 .../compat => patches/13.1}/compat-install-dirs.patch | 0 .../libc => patches/13.1}/libc-msun-arch-subdir.patch | 0 .../13.1}/libc-no-force--lcompiler-rt.patch | 0 .../libnetbsd => patches/13.1}/libnetbsd-do-install.patch | 0 .../libc => patches/13.1}/librpcsvc-include-subdir.patch | 0 .../13.1}/no-perms-BSD.include.dist.patch | 0 .../{pkgs/rpcgen => patches/13.1}/rpcgen-glibc-hack.patch | 0 .../freebsd/{pkgs/sys => patches/13.1}/sys-gnu-date.patch | 0 .../13.1}/sys-no-explicit-intrinsics-dep.patch | 0 pkgs/os-specific/bsd/freebsd/pkgs/compat/package.nix | 6 +++--- pkgs/os-specific/bsd/freebsd/pkgs/include/package.nix | 4 ++-- pkgs/os-specific/bsd/freebsd/pkgs/libc/package.nix | 7 ++++--- pkgs/os-specific/bsd/freebsd/pkgs/libnetbsd/package.nix | 6 +++--- pkgs/os-specific/bsd/freebsd/pkgs/rpcgen/package.nix | 6 +++--- pkgs/os-specific/bsd/freebsd/pkgs/sys/package.nix | 6 +++--- pkgs/os-specific/bsd/freebsd/versions.nix | 1 + 18 files changed, 21 insertions(+), 19 deletions(-) rename pkgs/os-specific/bsd/freebsd/{pkgs/compat => patches/13.1}/compat-fix-typedefs-locations.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/compat => patches/13.1}/compat-install-dirs.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/libc => patches/13.1}/libc-msun-arch-subdir.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/libc => patches/13.1}/libc-no-force--lcompiler-rt.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/libnetbsd => patches/13.1}/libnetbsd-do-install.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/libc => patches/13.1}/librpcsvc-include-subdir.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/include => patches/13.1}/no-perms-BSD.include.dist.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/rpcgen => patches/13.1}/rpcgen-glibc-hack.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/sys => patches/13.1}/sys-gnu-date.patch (100%) rename pkgs/os-specific/bsd/freebsd/{pkgs/sys => patches/13.1}/sys-no-explicit-intrinsics-dep.patch (100%) diff --git a/pkgs/os-specific/bsd/freebsd/package-set.nix b/pkgs/os-specific/bsd/freebsd/package-set.nix index 363e6693b93e..609b3f45b51e 100644 --- a/pkgs/os-specific/bsd/freebsd/package-set.nix +++ b/pkgs/os-specific/bsd/freebsd/package-set.nix @@ -1,6 +1,6 @@ { stdenv, lib, stdenvNoCC , fetchzip -, sourceData, versionData, buildFreebsd +, sourceData, versionData, buildFreebsd, patchesRoot }: self: @@ -9,7 +9,7 @@ lib.packagesFromDirectoryRecursive { callPackage = self.callPackage; directory = ./pkgs; } // { - inherit sourceData versionData; + inherit sourceData patchesRoot versionData; # Keep the crawled portion of Nixpkgs finite. buildFreebsd = lib.dontRecurseIntoAttrs buildFreebsd; 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/versions.nix b/pkgs/os-specific/bsd/freebsd/versions.nix index 4acfd5b6198b..e49396795e2d 100644 --- a/pkgs/os-specific/bsd/freebsd/versions.nix +++ b/pkgs/os-specific/bsd/freebsd/versions.nix @@ -33,6 +33,7 @@ let buildFreebsd = otherSplices.selfBuildHost; inherit sourceData; versionData = sourceData.version; + patchesRoot = ./patches/${sourceData.version.revision}; } // extraArgs ); From d5972ed69f2ee7600fa53422b34bfb6a5c2fd65a Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Thu, 2 May 2024 09:00:36 -0700 Subject: [PATCH 5/6] freebsd: Only export a limited number of attributes to top-level --- .../bsd/freebsd/default-branch.nix | 39 --------- pkgs/os-specific/bsd/freebsd/default.nix | 87 +++++++++++++++++++ pkgs/os-specific/bsd/freebsd/versions.nix | 46 ---------- pkgs/top-level/all-packages.nix | 14 +-- 4 files changed, 91 insertions(+), 95 deletions(-) create mode 100644 pkgs/os-specific/bsd/freebsd/default.nix delete mode 100644 pkgs/os-specific/bsd/freebsd/versions.nix diff --git a/pkgs/os-specific/bsd/freebsd/default-branch.nix b/pkgs/os-specific/bsd/freebsd/default-branch.nix index df13357aca41..e69de29bb2d1 100644 --- a/pkgs/os-specific/bsd/freebsd/default-branch.nix +++ b/pkgs/os-specific/bsd/freebsd/default-branch.nix @@ -1,39 +0,0 @@ -{ - lib, - config, - freebsdBranches, - freebsdBranchesCross, -}: - -let - branch = - let - fallbackBranch = "release/13.1.0"; - envBranch = builtins.getEnv "NIXPKGS_FREEBSD_BRANCH"; - selectedBranch = - if config.freebsdBranch != null then - config.freebsdBranch - else if envBranch != "" then - envBranch - else - null; - chosenBranch = if selectedBranch != null then selectedBranch else fallbackBranch; - in - if freebsdBranches ? ${chosenBranch} then - chosenBranch - else - throw '' - Unknown FreeBSD branch ${chosenBranch}! - 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 - - Set one with the NIXPKGS_FREEBSD_BRANCH environment variable or by setting `nixpkgs.config.freebsdBranch`. - ''; -in -{ - freebsd = freebsdBranches.${branch}; - freebsdCross = freebsdBranchesCross.${branch}; -} diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix new file mode 100644 index 000000000000..0b8bed04659f --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/default.nix @@ -0,0 +1,87 @@ +{ + lib, + config, + makeScopeWithSplicing', + generateSplicesForMkScope, + callPackage, + crossLibcStdenv, +}: + +let + versions = builtins.fromJSON (builtins.readFile ./versions.json); + + 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 + + Set one with the NIXPKGS_FREEBSD_BRANCH environment variable or by setting `nixpkgs.config.freebsdBranch`. + ''; + + attributes = + let + supported13 = "release/13.1.0"; + supported14 = "release/14.0.0"; + branch = + let + fallbackBranch = supported13; + envBranch = builtins.getEnv "NIXPKGS_FREEBSD_BRANCH"; + selectedBranch = + if config.freebsdBranch != null then + config.freebsdBranch + else if envBranch != "" then + envBranch + else + null; + chosenBranch = if selectedBranch != null then selectedBranch else fallbackBranch; + in + chosenBranch; + in + { + freebsd = versions.${branch} or (badBranchError branch); + freebsd13 = versions.${supported13} or (badBranchError supported13); + freebsd14 = versions.${supported14} or (badBranchError supported14); + }; + + # `./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: attribute: sourceData: + let + otherSplices = generateSplicesForMkScope [ attribute ]; + in + makeScopeWithSplicing' { + inherit otherSplices; + f = callPackage ./package-set.nix ( + { + buildFreebsd = otherSplices.selfBuildHost; + inherit sourceData; + versionData = sourceData.version; + patchesRoot = ./patches/${sourceData.version.revision}; + } + // extraArgs + ); + }; + + exportedAttrSetsNative = lib.mapAttrs (callFreeBSDWithAttrs { }) attributes; + + exportedAttrSetsCross = lib.mapAttrs' ( + name: sourceData: + lib.nameValuePair (name + "Cross") ( + callFreeBSDWithAttrs { stdenv = crossLibcStdenv; } name sourceData + ) + ) attributes; +in + +exportedAttrSetsNative // exportedAttrSetsCross diff --git a/pkgs/os-specific/bsd/freebsd/versions.nix b/pkgs/os-specific/bsd/freebsd/versions.nix deleted file mode 100644 index e49396795e2d..000000000000 --- a/pkgs/os-specific/bsd/freebsd/versions.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - config, - makeScopeWithSplicing', - generateSplicesForMkScope, - callPackage, - crossLibcStdenv, -}: - -let - versions = builtins.fromJSON (builtins.readFile ./versions.json); - - # `./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: branch: sourceData: - let - otherSplices = generateSplicesForMkScope [ - "freebsdBranches" - branch - ]; - in - makeScopeWithSplicing' { - inherit otherSplices; - f = callPackage ./package-set.nix ( - { - buildFreebsd = otherSplices.selfBuildHost; - inherit sourceData; - versionData = sourceData.version; - patchesRoot = ./patches/${sourceData.version.revision}; - } - // extraArgs - ); - }; -in -{ - freebsdBranches = lib.mapAttrs (callFreeBSDWithAttrs { }) versions; - - freebsdBranchesCross = lib.mapAttrs (callFreeBSDWithAttrs { stdenv = crossLibcStdenv; }) versions; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8ded19f002d9..f01a0f12634b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40910,16 +40910,10 @@ with pkgs; name = "bsd-setup-hook"; } ../os-specific/bsd/setup-hook.sh; - inherit (callPackage ../os-specific/bsd/freebsd/versions.nix {}) freebsdBranches freebsdBranchesCross; - - freebsd13 = freebsdBranches."release/13.2.0"; - freebsd14 = freebsdBranches."release/14.0.0"; - freebsdGit = freebsdBranches.main; - freebsd13Cross = freebsdBranchesCross."release/13.0.0"; - freebsd14Cross = freebsdBranchesCross."release/14.0.0"; - freebsdGitCross = freebsdBranchesCross.main; - - inherit (callPackage ../os-specific/bsd/freebsd/default-branch.nix {}) freebsd freebsdCross; + inherit (callPackage ../os-specific/bsd/freebsd {}) + freebsd freebsdCross + freebsd13 freebsd13Cross + freebsd14 freebsd14Cross; netbsd = callPackage ../os-specific/bsd/netbsd { }; netbsdCross = callPackage ../os-specific/bsd/netbsd { From 571f390dd9f4c59e86e78b75defc14414dc263c5 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 3 May 2024 07:12:26 -0700 Subject: [PATCH 6/6] freebsd: Only support branch selection via override... for now. Remove config element for freebsdBranch --- .../bsd/freebsd/default-branch.nix | 0 pkgs/os-specific/bsd/freebsd/default.nix | 71 +++++++------------ pkgs/top-level/all-packages.nix | 6 +- pkgs/top-level/config.nix | 8 --- 4 files changed, 26 insertions(+), 59 deletions(-) delete mode 100644 pkgs/os-specific/bsd/freebsd/default-branch.nix diff --git a/pkgs/os-specific/bsd/freebsd/default-branch.nix b/pkgs/os-specific/bsd/freebsd/default-branch.nix deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix index 0b8bed04659f..4295dc213af9 100644 --- a/pkgs/os-specific/bsd/freebsd/default.nix +++ b/pkgs/os-specific/bsd/freebsd/default.nix @@ -1,10 +1,11 @@ { lib, - config, makeScopeWithSplicing', generateSplicesForMkScope, callPackage, crossLibcStdenv, + attributePathToSplice ? [ "freebsd" ], + branch ? "release/13.1.0", }: let @@ -20,34 +21,9 @@ let * `stable/` for stable versions working towards the next minor release * `main` for the latest development version - Set one with the NIXPKGS_FREEBSD_BRANCH environment variable or by setting `nixpkgs.config.freebsdBranch`. + Branches can be selected by overriding the `branch` attribute on the freebsd package set. ''; - attributes = - let - supported13 = "release/13.1.0"; - supported14 = "release/14.0.0"; - branch = - let - fallbackBranch = supported13; - envBranch = builtins.getEnv "NIXPKGS_FREEBSD_BRANCH"; - selectedBranch = - if config.freebsdBranch != null then - config.freebsdBranch - else if envBranch != "" then - envBranch - else - null; - chosenBranch = if selectedBranch != null then selectedBranch else fallbackBranch; - in - chosenBranch; - in - { - freebsd = versions.${branch} or (badBranchError branch); - freebsd13 = versions.${supported13} or (badBranchError supported13); - freebsd14 = versions.${supported14} or (badBranchError supported14); - }; - # `./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: @@ -57,31 +33,32 @@ let # - construct the *anonymized* `buildFreebsd` attribute to be passed # to `./package-set.nix`. callFreeBSDWithAttrs = - extraArgs: attribute: sourceData: + extraArgs: let - otherSplices = generateSplicesForMkScope [ attribute ]; + # 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 = callPackage ./package-set.nix ( + f = + self: { - buildFreebsd = otherSplices.selfBuildHost; - inherit sourceData; - versionData = sourceData.version; - patchesRoot = ./patches/${sourceData.version.revision}; + inherit branch; } - // extraArgs - ); + // 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; }; - - exportedAttrSetsNative = lib.mapAttrs (callFreeBSDWithAttrs { }) attributes; - - exportedAttrSetsCross = lib.mapAttrs' ( - name: sourceData: - lib.nameValuePair (name + "Cross") ( - callFreeBSDWithAttrs { stdenv = crossLibcStdenv; } name sourceData - ) - ) attributes; in - -exportedAttrSetsNative // exportedAttrSetsCross +{ + freebsd = callFreeBSDWithAttrs { }; + freebsdCross = callFreeBSDWithAttrs { stdenv = crossLibcStdenv; }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f01a0f12634b..f42229dadae7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40910,10 +40910,8 @@ with pkgs; name = "bsd-setup-hook"; } ../os-specific/bsd/setup-hook.sh; - inherit (callPackage ../os-specific/bsd/freebsd {}) - freebsd freebsdCross - freebsd13 freebsd13Cross - freebsd14 freebsd14Cross; + 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/config.nix b/pkgs/top-level/config.nix index 4a5b12ed70db..67a9a60dbaea 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -74,14 +74,6 @@ let feature = "set `__contentAddressed` to true by default"; }; - freebsdBranch = mkMassRebuild { - type = types.nullOr types.str; - default = null; - description = '' - Default FreeBSD release to use for FreeBSD packages - ''; - }; - allowAliases = mkOption { type = types.bool; default = true;