use stdenv from pkgsCross on windows 2

This commit is contained in:
Clément DOUIN
2024-11-23 16:03:39 +01:00
parent a9bb2d287f
commit c4ae8626ed
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -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;
+3
View File
@@ -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;