diff options
Diffstat (limited to 'pkgs/os-specific/windows')
-rw-r--r-- | pkgs/os-specific/windows/default.nix | 52 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mcfgthreads/default.nix | 24 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mingw-w64/default.nix | 4 |
3 files changed, 62 insertions, 18 deletions
diff --git a/pkgs/os-specific/windows/default.nix b/pkgs/os-specific/windows/default.nix index 4621c2da10fb..7f1634d5c0b3 100644 --- a/pkgs/os-specific/windows/default.nix +++ b/pkgs/os-specific/windows/default.nix @@ -1,29 +1,45 @@ -{ newScope, crossLibcStdenv }: let +{ stdenv, buildPackages +, newScope, overrideCC, crossLibcStdenv, libcCross +}: - callPackage = newScope self; +stdenv.lib.makeScope newScope (self: with self; { - self = { - cygwinSetup = callPackage ./cygwin-setup { }; + cygwinSetup = callPackage ./cygwin-setup { }; - jom = callPackage ./jom { }; + jom = callPackage ./jom { }; - w32api = callPackage ./w32api { }; + w32api = callPackage ./w32api { }; - mingwrt = callPackage ./mingwrt { }; - mingw_runtime = self.mingwrt; + mingwrt = callPackage ./mingwrt { }; + mingw_runtime = mingwrt; - mingw_w64 = callPackage ./mingw-w64 { - stdenv = crossLibcStdenv; - }; - - mingw_w64_headers = callPackage ./mingw-w64/headers.nix { }; + mingw_w64 = callPackage ./mingw-w64 { + stdenv = crossLibcStdenv; + }; - mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { }; + 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; + })); - pthreads = callPackage ./pthread-w32 { }; + mingw_w64_headers = callPackage ./mingw-w64/headers.nix { }; - wxMSW = callPackage ./wxMSW-2.8 { }; + mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { + stdenv = crossThreadsStdenv; + }; - libgnurx = callPackage ./libgnurx { }; + mcfgthreads = callPackage ./mcfgthreads { + stdenv = crossThreadsStdenv; }; -in self + + pthreads = callPackage ./pthread-w32 { }; + + wxMSW = callPackage ./wxMSW-2.8 { }; + + libgnurx = callPackage ./libgnurx { }; +}) diff --git a/pkgs/os-specific/windows/mcfgthreads/default.nix b/pkgs/os-specific/windows/mcfgthreads/default.nix new file mode 100644 index 000000000000..6c4cd1710256 --- /dev/null +++ b/pkgs/os-specific/windows/mcfgthreads/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, autoreconfHook }: + +stdenv.mkDerivation { + pname = "mcfgthreads"; + version = "git"; + + src = fetchFromGitHub { + owner = "lhmouse"; + repo = "mcfgthread"; + rev = "9570e5ca7b98002d707c502c919d951bf256b9c6"; + sha256 = "10y2x3x601a7c1hkd6zlr3xpfsnlr05xl28v23clf619756a5755"; + }; + + outputs = [ "out" "dev" ]; + + # Don't want prebuilt binaries sneaking in. + postUnpack = '' + rm -r "$sourceRoot/debug" "$sourceRoot/release" + ''; + + nativeBuildInputs = [ + autoreconfHook + ]; +} diff --git a/pkgs/os-specific/windows/mingw-w64/default.nix b/pkgs/os-specific/windows/mingw-w64/default.nix index 022aaffe5961..7efc2e213133 100644 --- a/pkgs/os-specific/windows/mingw-w64/default.nix +++ b/pkgs/os-specific/windows/mingw-w64/default.nix @@ -11,11 +11,15 @@ in stdenv.mkDerivation { sha256 = "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm"; }; + outputs = [ "out" "dev" ]; + configureFlags = [ "--enable-idl" "--enable-secure-api" ]; + enableParallelBuilding = true; + buildInputs = [ windows.mingw_w64_headers ]; dontStrip = true; hardeningDisable = [ "stackprotector" "fortify" ]; |