diff options
author | Vika <vika@fireburn.ru> | 2024-05-19 01:28:44 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2024-05-19 01:28:44 +0300 |
commit | ca04fc74a5904601947132f9ce42a22bc379c136 (patch) | |
tree | 23973b9c406612775551a6783cf5baaa8b189ba8 /kittybox.nix | |
parent | 113a6f9fe6603be7488c1c9a5bb4b1b7c5bb2f71 (diff) |
WIP: cross-compilation attempt via overlay nix-cross
Doesn't work, linker troubles. Not sure what's happening, but I probably need to tweak rustc a bit.
Diffstat (limited to 'kittybox.nix')
-rw-r--r-- | kittybox.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kittybox.nix b/kittybox.nix index eea7006..a8cac0e 100644 --- a/kittybox.nix +++ b/kittybox.nix @@ -29,6 +29,10 @@ naersk.buildPackage rec { postgresql postgresqlTestHook ]; + # Cross-compilation support + CARGO_BUILD_TARGET = stdenv.targetPlatform.rust.cargoShortTarget; + "CARGO_TARGET_${stdenv.targetPlatform.rust.cargoEnvVarTarget}_RUSTFLAGS" = "-C linker=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; + # Tests create arbitrary databases; we need to be prepared for that postgresqlTestUserOptions = "LOGIN SUPERUSER"; postgresqlTestSetupPost = '' |