buildFHSEnvBubblewrap/buildFHSEnv: permit pname+version instead of name
This commit is contained in:
parent
bbb1f25bfb
commit
eb02e003b0
2 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue