mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
{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:
parent
efc90c3e0e
commit
f7ef27a982
@ -12,6 +12,7 @@
|
|||||||
, targetPkgs ? pkgs: []
|
, targetPkgs ? pkgs: []
|
||||||
, multiPkgs ? pkgs: []
|
, multiPkgs ? pkgs: []
|
||||||
, multiArch ? false # Whether to include 32bit packages
|
, multiArch ? false # Whether to include 32bit packages
|
||||||
|
, nativeBuildInputs ? []
|
||||||
, extraBuildCommands ? ""
|
, extraBuildCommands ? ""
|
||||||
, extraBuildCommandsMulti ? ""
|
, extraBuildCommandsMulti ? ""
|
||||||
, extraOutputsToInstall ? []
|
, extraOutputsToInstall ? []
|
||||||
@ -257,6 +258,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
in runCommandLocal "${name}-fhs" {
|
in runCommandLocal "${name}-fhs" {
|
||||||
|
inherit nativeBuildInputs;
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild;
|
inherit args baseTargetPaths targetPaths baseMultiPaths ldconfig isMultiBuild;
|
||||||
};
|
};
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
{ runScript ? "bash"
|
{ runScript ? "bash"
|
||||||
|
, nativeBuildInputs ? []
|
||||||
, extraInstallCommands ? ""
|
, extraInstallCommands ? ""
|
||||||
, meta ? {}
|
, meta ? {}
|
||||||
, passthru ? {}
|
, passthru ? {}
|
||||||
@ -270,7 +271,7 @@ let
|
|||||||
|
|
||||||
bin = writeShellScript "${name}-bwrap" (bwrapCmd { initArgs = ''"$@"''; });
|
bin = writeShellScript "${name}-bwrap" (bwrapCmd { initArgs = ''"$@"''; });
|
||||||
in runCommandLocal name (nameAttrs // {
|
in runCommandLocal name (nameAttrs // {
|
||||||
inherit meta;
|
inherit nativeBuildInputs meta;
|
||||||
|
|
||||||
passthru = passthru // {
|
passthru = passthru // {
|
||||||
env = runCommandLocal "${name}-shell-env" {
|
env = runCommandLocal "${name}-shell-env" {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
let buildFHSEnv = callPackage ./env.nix { }; in
|
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
|
let
|
||||||
env = buildFHSEnv (removeAttrs args [ "version" "runScript" "extraInstallCommands" "meta" "passthru" ]);
|
env = buildFHSEnv (removeAttrs args [ "version" "runScript" "extraInstallCommands" "meta" "passthru" ]);
|
||||||
@ -28,7 +28,7 @@ let
|
|||||||
nameAndVersion = name + versionStr;
|
nameAndVersion = name + versionStr;
|
||||||
|
|
||||||
in runCommandLocal nameAndVersion {
|
in runCommandLocal nameAndVersion {
|
||||||
inherit meta;
|
inherit nativeBuildInputs meta;
|
||||||
|
|
||||||
passthru = passthru // {
|
passthru = passthru // {
|
||||||
env = runCommandLocal "${name}-shell-env" {
|
env = runCommandLocal "${name}-shell-env" {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
, profile ? ""
|
, profile ? ""
|
||||||
, targetPkgs ? pkgs: []
|
, targetPkgs ? pkgs: []
|
||||||
, multiPkgs ? pkgs: []
|
, multiPkgs ? pkgs: []
|
||||||
|
, nativeBuildInputs ? []
|
||||||
, extraBuildCommands ? ""
|
, extraBuildCommands ? ""
|
||||||
, extraBuildCommandsMulti ? ""
|
, extraBuildCommandsMulti ? ""
|
||||||
, extraOutputsToInstall ? []
|
, extraOutputsToInstall ? []
|
||||||
@ -245,6 +246,7 @@ let
|
|||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name = "${name}-fhs";
|
name = "${name}-fhs";
|
||||||
|
inherit nativeBuildInputs;
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cd $out
|
cd $out
|
||||||
|
Loading…
Reference in New Issue
Block a user