From 62b2adc753eaec8c3b3b10593055e96450c82b36 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sat, 1 Jul 2023 06:36:05 +0200 Subject: [PATCH] buildFHSEnv: add multiArch flag The intention is to allow the user control over whether 32bit deps are supposed to be included in the fhsenv --- doc/builders/special/fhs-environments.section.md | 2 ++ pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/builders/special/fhs-environments.section.md b/doc/builders/special/fhs-environments.section.md index 5a248e4ead92..8145fbd730f7 100644 --- a/doc/builders/special/fhs-environments.section.md +++ b/doc/builders/special/fhs-environments.section.md @@ -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` diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix b/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix index f4fcc79b3936..15504916af63 100644 --- a/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix +++ b/pkgs/build-support/build-fhsenv-bubblewrap/buildFHSEnv.nix @@ -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