b64a9bb1a9
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 <audrey@rhelmot.io> Co-Authored-By: Artemis Tosini <me@artem.ist>
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{
|
|
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/<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
|
|
|
|
Set one with the NIXPKGS_FREEBSD_BRANCH environment variable or by setting `nixpkgs.config.freebsdBranch`.
|
|
'';
|
|
in
|
|
{
|
|
freebsd = freebsdBranches.${branch};
|
|
freebsdCross = freebsdBranchesCross.${branch};
|
|
}
|