From ca04fc74a5904601947132f9ce42a22bc379c136 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 19 May 2024 01:28:44 +0300 Subject: WIP: cross-compilation attempt via overlay Doesn't work, linker troubles. Not sure what's happening, but I probably need to tweak rustc a bit. --- kittybox.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kittybox.nix') 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 = '' -- cgit 1.4.1