diff options
Diffstat (limited to 'pkgs/os-specific/bsd/freebsd/default.nix')
-rw-r--r-- | pkgs/os-specific/bsd/freebsd/default.nix | 62 |
1 files changed, 25 insertions, 37 deletions
diff --git a/pkgs/os-specific/bsd/freebsd/default.nix b/pkgs/os-specific/bsd/freebsd/default.nix index e56c70c1d32d0..cfe6080b020a0 100644 --- a/pkgs/os-specific/bsd/freebsd/default.nix +++ b/pkgs/os-specific/bsd/freebsd/default.nix @@ -3,7 +3,6 @@ makeScopeWithSplicing', generateSplicesForMkScope, callPackage, - crossLibcStdenv, attributePathToSplice ? [ "freebsd" ], branch ? "release/14.0.0", }: @@ -24,41 +23,30 @@ let 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; - }; + # 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 -{ - freebsd = callFreeBSDWithAttrs { }; - freebsdCross = callFreeBSDWithAttrs { stdenv = crossLibcStdenv; }; +# `./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`. +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}"; + }) self; } |