{buildFHSEnvBubblewrap,buildFHSEnvChroot}: add nativeBuildInputs

`makeWrapper` is often used in these with `source "${makeWrapper}/nix-support/setup-hook"`
which causes `error: makeWrapper/makeShellWrapper must be in nativeBuildInputs` on cross.
This commit is contained in:
Artturin 2024-09-25 22:43:00 +03:00
parent efc90c3e0e
commit f7ef27a982
4 changed files with 8 additions and 3 deletions

View File

@ -12,6 +12,7 @@
, targetPkgs ? pkgs: []
, multiPkgs ? pkgs: []
, multiArch ? false # Whether to include 32bit packages
, nativeBuildInputs ? []
, extraBuildCommands ? ""
, extraBuildCommandsMulti ? ""
, extraOutputsToInstall ? []
@ -257,6 +258,7 @@ let
'';
in runCommandLocal "${name}-fhs" {
inherit nativeBuildInputs;
passthru = {
inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild;
};

View File

@ -10,6 +10,7 @@
}:
{ runScript ? "bash"
, nativeBuildInputs ? []
, extraInstallCommands ? ""
, meta ? {}
, passthru ? {}
@ -270,7 +271,7 @@ let
bin = writeShellScript "${name}-bwrap" (bwrapCmd { initArgs = ''"$@"''; });
in runCommandLocal name (nameAttrs // {
inherit meta;
inherit nativeBuildInputs meta;
passthru = passthru // {
env = runCommandLocal "${name}-shell-env" {

View File

@ -2,7 +2,7 @@
let buildFHSEnv = callPackage ./env.nix { }; in
args@{ name, version ? null, runScript ? "bash", extraInstallCommands ? "", meta ? {}, passthru ? {}, ... }:
args@{ name, version ? null, runScript ? "bash", nativeBuildInputs ? [], extraInstallCommands ? "", meta ? {}, passthru ? {}, ... }:
let
env = buildFHSEnv (removeAttrs args [ "version" "runScript" "extraInstallCommands" "meta" "passthru" ]);
@ -28,7 +28,7 @@ let
nameAndVersion = name + versionStr;
in runCommandLocal nameAndVersion {
inherit meta;
inherit nativeBuildInputs meta;
passthru = passthru // {
env = runCommandLocal "${name}-shell-env" {

View File

@ -4,6 +4,7 @@
, profile ? ""
, targetPkgs ? pkgs: []
, multiPkgs ? pkgs: []
, nativeBuildInputs ? []
, extraBuildCommands ? ""
, extraBuildCommandsMulti ? ""
, extraOutputsToInstall ? []
@ -245,6 +246,7 @@ let
in stdenv.mkDerivation {
name = "${name}-fhs";
inherit nativeBuildInputs;
buildCommand = ''
mkdir -p $out
cd $out