harec: enable cross-compilation
This commit is contained in:
parent
1bdb07e199
commit
f8b46d2bbd
1 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,11 @@
|
|||
let
|
||||
platform = lib.toLower stdenv.hostPlatform.uname.system;
|
||||
arch = stdenv.hostPlatform.uname.processor;
|
||||
qbePlatform = {
|
||||
x86_64 = "amd64_sysv";
|
||||
aarch64 = "arm64";
|
||||
riscv64 = "rv64";
|
||||
}.${arch};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "harec";
|
||||
|
@ -31,6 +36,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
"PREFIX=${builtins.placeholder "out"}"
|
||||
"ARCH=${arch}"
|
||||
"VERSION=${finalAttrs.version}-nixpkgs"
|
||||
"QBEFLAGS=-t${qbePlatform}"
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
"AS=${stdenv.cc.targetPrefix}as"
|
||||
"LD=${stdenv.cc.targetPrefix}ld"
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
|
Loading…
Reference in a new issue