1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

windows.mingw_w64*: use lib for autoconf flags

This commit is contained in:
seth 2024-08-16 04:43:27 -04:00
parent 14e440390a
commit 3d51188a76
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
2 changed files with 12 additions and 9 deletions

View file

@ -22,9 +22,9 @@ stdenv.mkDerivation {
];
configureFlags = [
"--enable-idl"
"--enable-secure-api"
"--with-default-msvcrt=${crt}"
(lib.enableFeature true "idl")
(lib.enableFeature true "secure-api")
(lib.withFeatureAs true "default-msvcrt" crt)
];
enableParallelBuilding = true;

View file

@ -1,14 +1,17 @@
{ stdenv, mingw_w64_headers }:
{
lib,
stdenv,
mingw_w64_headers,
# Rustc require 'libpthread.a' when targeting 'x86_64-pc-windows-gnu'.
# Enabling this makes it work out of the box instead of failing.
withStatic ? true,
}:
stdenv.mkDerivation {
pname = "mingw_w64-pthreads";
inherit (mingw_w64_headers) version src meta;
configureFlags = [
# Rustc require 'libpthread.a' when targeting 'x86_64-pc-windows-gnu'.
# Enabling this makes it work out of the box instead of failing.
"--enable-static"
];
configureFlags = [ (lib.enableFeature withStatic "static") ];
preConfigure = ''
cd mingw-w64-libraries/winpthreads