summaryrefslogtreecommitdiffstats
path: root/pkgs/os-specific/windows
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-11-10 22:35:59 -0500
committerJohn Ericson <git@JohnEricson.me>2019-11-11 00:25:24 -0500
commit06c5e811e6e0244a8e5a9645fd8347c719aab228 (patch)
tree4da9912b710e4e45c42606e982640922e22397d1 /pkgs/os-specific/windows
parent0a63190c3115126e6a571b6ca555fa684b8bf4ed (diff)
mcfgthreads: Init from git
Diffstat (limited to 'pkgs/os-specific/windows')
-rw-r--r--pkgs/os-specific/windows/default.nix22
-rw-r--r--pkgs/os-specific/windows/mcfgthreads/default.nix19
2 files changed, 39 insertions, 2 deletions
diff --git a/pkgs/os-specific/windows/default.nix b/pkgs/os-specific/windows/default.nix
index 8c2f3ca54981..7f1634d5c0b3 100644
--- a/pkgs/os-specific/windows/default.nix
+++ b/pkgs/os-specific/windows/default.nix
@@ -1,4 +1,6 @@
-{ stdenv, newScope, crossLibcStdenv }:
+{ stdenv, buildPackages
+, newScope, overrideCC, crossLibcStdenv, libcCross
+}:
stdenv.lib.makeScope newScope (self: with self; {
@@ -15,9 +17,25 @@ stdenv.lib.makeScope newScope (self: with self; {
stdenv = crossLibcStdenv;
};
+ crossThreadsStdenv = overrideCC crossLibcStdenv
+ (if stdenv.hostPlatform.useLLVM or false
+ then buildPackages.llvmPackages_8.lldClangNoLibcxx
+ else buildPackages.gccCrossStageStatic.override (old: {
+ bintools = old.bintools.override {
+ libc = libcCross;
+ };
+ libc = libcCross;
+ }));
+
mingw_w64_headers = callPackage ./mingw-w64/headers.nix { };
- mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { };
+ mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix {
+ stdenv = crossThreadsStdenv;
+ };
+
+ mcfgthreads = callPackage ./mcfgthreads {
+ stdenv = crossThreadsStdenv;
+ };
pthreads = callPackage ./pthread-w32 { };
diff --git a/pkgs/os-specific/windows/mcfgthreads/default.nix b/pkgs/os-specific/windows/mcfgthreads/default.nix
new file mode 100644
index 000000000000..468e92a1e9d8
--- /dev/null
+++ b/pkgs/os-specific/windows/mcfgthreads/default.nix
@@ -0,0 +1,19 @@
+{ stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation {
+ pname = "mcfgthreads";
+ version = "git";
+ src = fetchFromGitHub {
+ owner = "lhmouse";
+ repo = "mcfgthread";
+ rev = "9570e5ca7b98002d707c502c919d951bf256b9c6";
+ sha256 = "10y2x3x601a7c1hkd6zlr3xpfsnlr05xl28v23clf619756a5755";
+ };
+ # Don't want prebuilt binaries sneaking in.
+ postUnpack = ''
+ rm -r "$sourceRoot/debug" "$sourceRoot/release"
+ '';
+ nativeBuildInputs = [
+ autoreconfHook
+ ];
+}