From c4ae8626ed6e028bf7bf5eefc03a1831ef411679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Sat, 23 Nov 2024 16:03:39 +0100 Subject: [PATCH] use stdenv from pkgsCross on windows 2 --- default.nix | 1 + package.nix | 3 +++ 2 files changed, 4 insertions(+) diff --git a/default.nix b/default.nix index b73bdddc..487a246b 100644 --- a/default.nix +++ b/default.nix @@ -37,6 +37,7 @@ let fetchFromGitHub = hostPkgs.fetchFromGitHub; pkg-config = hostPkgs.pkg-config; darwin = hostPkgs.darwin; + windows = hostPkgs.pkgsCross.mingwW64.windows; installShellFiles = false; installShellCompletions = false; installManPages = false; diff --git a/package.nix b/package.nix index a7a50369..4dbd07cf 100644 --- a/package.nix +++ b/package.nix @@ -4,6 +4,7 @@ , stdenv , pkg-config , darwin +, windows , installShellFiles , installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform , installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform @@ -40,6 +41,8 @@ rustPlatform.buildRustPackage rec { "--lib" ]; + depsBuildBuild = lib.optionals stdenv.hostPlatform.isWindows [ stdenv.cc windows.pthreads ]; + nativeBuildInputs = [ ] ++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) pkg-config ++ lib.optional (installManPages || installShellCompletions) installShellFiles;