From 6ea34850ff78d513d173392404694a557397e054 Mon Sep 17 00:00:00 2001 From: Raymond Gauthier Date: Tue, 12 Oct 2021 09:45:54 -0400 Subject: mingw_w64_pthreads: enable 'static' lib output This make this 'mingw_w64_pthreads' package suitable for use when cross compiling rust code from linux to windows. --- pkgs/os-specific/windows/mingw-w64/pthreads.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/os-specific/windows') diff --git a/pkgs/os-specific/windows/mingw-w64/pthreads.nix b/pkgs/os-specific/windows/mingw-w64/pthreads.nix index bbcb028d3cb..3b143efed1d 100644 --- a/pkgs/os-specific/windows/mingw-w64/pthreads.nix +++ b/pkgs/os-specific/windows/mingw-w64/pthreads.nix @@ -4,6 +4,12 @@ stdenv.mkDerivation { name = "${mingw_w64.name}-pthreads"; inherit (mingw_w64) 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" + ]; + preConfigure = '' cd mingw-w64-libraries/winpthreads ''; -- cgit 1.4.1