Commit f7ef27a9 authored by Artturin's avatar Artturin
Browse files

{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.
parent efc90c3e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
  };
+2 −1
Original line number Diff line number Diff line
@@ -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" {
+2 −2
Original line number Diff line number Diff line
@@ -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" {
+2 −0
Original line number Diff line number Diff line
@@ -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