buildFHSEnv: add multiArch flag

The intention is to allow the user control over whether 32bit deps are supposed
to be included in the fhsenv
This commit is contained in:
Atemu 2023-07-01 06:36:05 +02:00
parent 167264179b
commit 62b2adc753
2 changed files with 5 additions and 2 deletions

View File

@ -11,6 +11,8 @@ Accepted arguments are:
Packages to be installed for the main host's architecture (i.e. x86_64 on x86_64 installations). Along with libraries binaries are also installed.
- `multiPkgs`
Packages to be installed for all architectures supported by a host (i.e. i686 and x86_64 on x86_64 installations). Only libraries are installed by default.
- `multiArch`
Whether to install 32bit multiPkgs into the FHSEnv in 64bit environments
- `extraBuildCommands`
Additional commands to be executed for finalizing the directory structure.
- `extraBuildCommandsMulti`

View File

@ -12,6 +12,7 @@
, profile ? ""
, targetPkgs ? pkgs: []
, multiPkgs ? pkgs: []
, multiArch ? true # Whether to include 32bit packages
, extraBuildCommands ? ""
, extraBuildCommandsMulti ? ""
, extraOutputsToInstall ? []
@ -35,8 +36,8 @@
let
inherit (stdenv) is64bit;
# use of glibc_multi is only supported on x86_64-linux
isMultiBuild = stdenv.system == "x86_64-linux";
# "use of glibc_multi is only supported on x86_64-linux"
isMultiBuild = multiArch && stdenv.system == "x86_64-linux";
isTargetBuild = !isMultiBuild;
# list of packages (usually programs) which are only be installed for the