buildFHSEnvBubblewrap/buildFHSEnv: permit pname+version instead of name

This commit is contained in:
Peder Bergebakken Sundt 2023-12-10 12:19:26 +01:00
parent bbb1f25bfb
commit eb02e003b0
2 changed files with 7 additions and 4 deletions

View file

@ -8,14 +8,14 @@
, pkgsi686Linux
}:
{ name ? null
, profile ? ""
{ profile ? ""
, targetPkgs ? pkgs: []
, multiPkgs ? pkgs: []
, multiArch ? false # Whether to include 32bit packages
, extraBuildCommands ? ""
, extraBuildCommandsMulti ? ""
, extraOutputsToInstall ? []
, ... # for name, or pname+version
} @ args:
# HOWTO:
@ -36,6 +36,10 @@
let
inherit (stdenv) is64bit;
name = if (args ? pname && args ? version)
then "${args.pname}-${args.version}"
else args.name;
# "use of glibc_multi is only supported on x86_64-linux"
isMultiBuild = multiArch && stdenv.system == "x86_64-linux";
isTargetBuild = !isMultiBuild;

View file

@ -47,10 +47,9 @@ let
buildFHSEnv = callPackage ./buildFHSEnv.nix { };
fhsenv = buildFHSEnv (removeAttrs (args // { inherit name; }) [
fhsenv = buildFHSEnv (removeAttrs args [
"runScript" "extraInstallCommands" "meta" "passthru" "extraPreBwrapCmds" "extraBwrapArgs" "dieWithParent"
"unshareUser" "unshareCgroup" "unshareUts" "unshareNet" "unsharePid" "unshareIpc" "privateTmp"
"pname" "version"
]);
etcBindEntries = let