fakechroot: fix cross / strictDeps build
This commit is contained in:
parent
f28864e00d
commit
3be0be21ed
@ -4,6 +4,9 @@
|
|||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
fetchpatch,
|
fetchpatch,
|
||||||
autoreconfHook,
|
autoreconfHook,
|
||||||
|
bash,
|
||||||
|
buildPackages,
|
||||||
|
coreutils,
|
||||||
nixosTests,
|
nixosTests,
|
||||||
perl,
|
perl,
|
||||||
}:
|
}:
|
||||||
@ -54,8 +57,29 @@ stdenv.mkDerivation rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
for f in scripts/*; do
|
||||||
|
substituteInPlace $f \
|
||||||
|
--replace-quiet "@SHELL@" "${lib.getExe bash}" \
|
||||||
|
--replace-quiet "@CHROOT@" "${lib.getExe' coreutils "chroot"}" \
|
||||||
|
--replace-quiet "@ECHO@" "${lib.getExe' coreutils "echo"}" \
|
||||||
|
--replace-quiet "@ENV@" "${lib.getExe' coreutils "env"}" \
|
||||||
|
--replace-quiet "@MKFIFO@" "${lib.getExe' coreutils "mkfifo"}" \
|
||||||
|
--replace-quiet "@SEQ@" "${lib.getExe' coreutils "seq"}"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
buildInputs = [ perl ];
|
|
||||||
|
buildInputs = [
|
||||||
|
bash
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
# pass in correct pod2man when cross-compiling
|
||||||
|
"ac_cv_path_POD2MAN=${lib.getExe' buildPackages.perl "pod2man"}"
|
||||||
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
tests = {
|
tests = {
|
||||||
@ -64,6 +88,10 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
patchShebangs --host $out/bin
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/dex4er/fakechroot";
|
homepage = "https://github.com/dex4er/fakechroot";
|
||||||
description = "Give a fake chroot environment through LD_PRELOAD";
|
description = "Give a fake chroot environment through LD_PRELOAD";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user