bonsai: support cross compilation
This commit is contained in:
parent
664b21e5f1
commit
8ad4ee4341
|
@ -240,14 +240,14 @@ in {
|
|||
# # configure: error: ifconfig or ip not found, install net-tools or iproute2
|
||||
# nativeBuildInputs = orig.nativeBuildInputs ++ [ final.iproute2 ];
|
||||
# });
|
||||
bonsai = emulateBuildMachine (prev.bonsai.override {
|
||||
hare = emulateBuildMachine (final.hare.override {
|
||||
qbe = emulateBuildMachine final.qbe;
|
||||
harePackages.harec = emulateBuildMachine (final.harePackages.harec.override {
|
||||
qbe = emulateBuildMachine final.qbe;
|
||||
});
|
||||
});
|
||||
});
|
||||
# bonsai = emulateBuildMachine (prev.bonsai.override {
|
||||
# hare = emulateBuildMachine (final.hare.override {
|
||||
# qbe = emulateBuildMachine final.qbe;
|
||||
# harePackages.harec = emulateBuildMachine (final.harePackages.harec.override {
|
||||
# qbe = emulateBuildMachine final.qbe;
|
||||
# });
|
||||
# });
|
||||
# });
|
||||
# bonsai = prev.bonsai.override {
|
||||
# inherit (emulated) stdenv hare;
|
||||
# };
|
||||
|
|
|
@ -18,6 +18,21 @@ stdenv.mkDerivation rec {
|
|||
hash = "sha256-jOtFUpl2/Aa7f8JMZf6g63ayFOi+Ci+i7Ac63k63znc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace 'hare build' 'hare build $(HARE_TARGET_FLAGS)'
|
||||
'';
|
||||
|
||||
env.HARE_TARGET_FLAGS =
|
||||
if stdenv.hostPlatform.isAarch64 then
|
||||
"-t aarch64"
|
||||
else if stdenv.hostPlatform.isRiscV64 then
|
||||
"-t riscv64"
|
||||
else if stdenv.hostPlatform.isx86_64 then
|
||||
"-t x86_64"
|
||||
else
|
||||
"";
|
||||
|
||||
nativeBuildInputs = [
|
||||
hare
|
||||
hare-ev
|
||||
|
@ -31,7 +46,7 @@ stdenv.mkDerivation rec {
|
|||
# export ARFLAGS="-csr"
|
||||
'';
|
||||
|
||||
installFlags = [ "PREFIX=" "DESTDIR=$(out)" ];
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
rev-prefix = "v";
|
||||
|
|
|
@ -21,7 +21,9 @@ let
|
|||
|
||||
### ADDITIONAL PACKAGES
|
||||
alsa-ucm-conf-sane = callPackage ./additional/alsa-ucm-conf-sane { };
|
||||
bonsai = unpatched.bonsai or (callPackage ./additional/bonsai { });
|
||||
# TODO: move target flags to upstream PR and re-enable this bonsai
|
||||
# bonsai = unpatched.bonsai or (callPackage ./additional/bonsai { });
|
||||
bonsai = callPackage ./additional/bonsai { };
|
||||
bootpart-uefi-x86_64 = callPackage ./additional/bootpart-uefi-x86_64 { };
|
||||
cargoDocsetHook = callPackage ./additional/cargo-docset/hook.nix { };
|
||||
chatty-latest = callPackage ./additional/chatty-latest { };
|
||||
|
|
Loading…
Reference in New Issue
Block a user