From 44cfba79509f6dd98ae306f62f2cc3183bbd1ab1 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 24 Feb 2014 04:44:43 +0100 Subject: [PATCH] mingw-w64-pthreads: Create based on mingw-w64. The winpthreads library is part of the same source package, so let's just override the name and the source directory. Signed-off-by: aszlig --- pkgs/os-specific/windows/mingw-w64/default.nix | 10 +++++++++- pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/windows/mingw-w64/default.nix b/pkgs/os-specific/windows/mingw-w64/default.nix index f1c509a50984..c5b6017aae4d 100644 --- a/pkgs/os-specific/windows/mingw-w64/default.nix +++ b/pkgs/os-specific/windows/mingw-w64/default.nix @@ -1,4 +1,7 @@ -{stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}: +{ stdenv, fetchurl, binutilsCross ? null, gccCross ? null +, onlyHeaders ? false +, onlyPthreads ? false +}: let name = "mingw-w64-3.1.0"; @@ -17,6 +20,11 @@ stdenv.mkDerivation (rec { cd mingw-w64-headers ''; configureFlags = "--without-crt --host=x86_64-w64-mingw32"; +} else if onlyPthreads then { + name = name + "-pthreads"; + preConfigure = '' + cd mingw-w64-libraries/winpthreads + ''; } else { buildInputs = [ gccCross binutilsCross ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 64f2bb688c4a..133ef21060c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7191,6 +7191,10 @@ let onlyHeaders = true; }; + mingw_w64_pthreads = callPackage ../os-specific/windows/mingw-w64 { + onlyPthreads = true; + }; + pthreads = callPackage ../os-specific/windows/pthread-w32 { mingw_headers = mingw_headers3; };