diff options
| author | LLLL Colonq <llll@colonq> | 2025-03-17 22:47:14 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-03-17 22:47:14 -0400 |
| commit | 07cfdb8d05ffd36c3d1479c261246744556157be (patch) | |
| tree | b90a63ebcf6ccbe6e446f8bff5c745784ccb22b3 /flake.nix | |
| parent | 3b8c5115984db34796a507ad5b78a6f3769ccf22 (diff) | |
Update windows
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 23 |
1 files changed, 10 insertions, 13 deletions
@@ -139,15 +139,6 @@ }; windows = rec { - cpkgs = pkgs.pkgsCross.mingwW64; - nativeBuildInputs = [ - cpkgs.buildPackages.gcc - ]; - buildInputs = [ - # cpkgs.openssl.dev - cpkgs.glfw - cpkgs.windows.pthreads - ]; build = path: nm: let src = lib.cleanSourceWith { @@ -161,9 +152,17 @@ ; }; commonArgs = { - inherit src nativeBuildInputs buildInputs; + inherit src; strictDeps = true; CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu"; + TARGET_CC = "${pkgs.pkgsCross.mingwW64.stdenv.cc}/bin/${pkgs.pkgsCross.mingwW64.stdenv.cc.targetPrefix}cc"; + OPENSSL_DIR = "${pkgs.openssl.dev}"; + OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; + OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include/"; + depsBuildBuild = with pkgs; [ + pkgsCross.mingwW64.stdenv.cc + pkgsCross.mingwW64.windows.pthreads + ]; inherit (craneLib.crateNameFromCargoToml { inherit src; }) version; }; cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { @@ -183,9 +182,7 @@ pkgs.rust-analyzer pkgs.glxinfo pkgs.cmake - ] - ++ native.nativeBuildInputs ++ native.buildInputs - ++ windows.nativeBuildInputs ++ windows.buildInputs; + ] ++ native.nativeBuildInputs ++ native.buildInputs; LIBRARY_PATH = "$LIBRARY_PATH:${pkgs.lib.makeLibraryPath native.buildInputs}"; RUSTFLAGS="-L ${glfw}/lib"; LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath native.buildInputs}"; |
