mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
6ea34850ff
This make this 'mingw_w64_pthreads' package suitable for use when cross compiling rust code from linux to windows.
17 lines
378 B
Nix
17 lines
378 B
Nix
{ stdenv, mingw_w64 }:
|
|
|
|
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
|
|
'';
|
|
}
|