summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2025-03-18 01:20:02 -0400
committerLLLL Colonq <llll@colonq>2025-03-18 01:20:14 -0400
commitf312b96443f545081cb4ccfea40f3a0fb0eb8453 (patch)
tree99e11069b3525ab650aaab5b29205afd75625618
parent7da12c1da133e5a5bc508fef685dff97259fc63e (diff)
Fix windows nix config
-rw-r--r--flake.nix16
1 files changed, 4 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 3a1d677..f076526 100644
--- a/flake.nix
+++ b/flake.nix
@@ -144,18 +144,12 @@
env = {};
postPatch = "true";
});
- cc = pkgs.pkgsCross.mingwW64.buildPackages.wrapCCWith {
- cc = pkgs.pkgsCross.mingwW64.buildPackages.gcc;
- extraPackages = [
- # pkgs.pkgsCross.mingwW64.windows.pthreads
- # glfw
- ];
- };
+ rustflags = "-L ${glfw}/lib -L ${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
shell = craneLib.devShell {
packages = [
- cc
+ pkgs.pkgsCross.mingwW64.buildPackages.gcc
];
- RUSTFLAGS="-L ${glfw}/lib -L ${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
+ RUSTFLAGS = rustflags;
};
build = path: nm:
let
@@ -173,12 +167,10 @@
inherit src;
strictDeps = true;
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
- CARGO_BUILD_RUSTFLAGS="-L ${pkgs.pkgsCross.mingwW64.glfw}/bin";
+ CARGO_BUILD_RUSTFLAGS = rustflags;
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER = "${pkgs.pkgsCross.mingwW64.stdenv.cc}/bin/${pkgs.pkgsCross.mingwW64.stdenv.cc.targetPrefix}cc";
depsBuildBuild = with pkgs; [
pkgsCross.mingwW64.buildPackages.gcc
- pkgsCross.mingwW64.windows.pthreads
- glfw
];
inherit (craneLib.crateNameFromCargoToml { inherit src; }) version;
};