From 9d4cc93d60a0864a47e4dbcf2f81444d8ab87d77 Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Mon, 15 Jan 2024 18:18:39 +0100 Subject: [PATCH] build(nix): mingwW64 build --- flake.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/flake.nix b/flake.nix index 35fa66b..601d39d 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,24 @@ rustc = toolchain; }; }; + "${packageName}-cross-mingwW64-static" = let + pkgsCross = pkgs.pkgsCross.mingwW64.pkgsStatic; + toolchain = with fenix-pkgs; + combine [ + minimal.cargo + minimal.rustc + targets.${pkgsCross.rust.lib.toRustTarget pkgsCross.stdenv.targetPlatform}.latest.rust-std + ]; + in + pkgsCross.callPackage (./. + "/nix/packages/${packageName}.nix") { + inherit packageName; + flake-self = self; + nix-filter = import nix-filter; + rustPlatform = pkgsCross.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; + }; }); devShells = forSystems ({