windows: refactor
This commit is contained in:
parent
31e11bdd60
commit
9cee386f38
29
pkgs/os-specific/windows/default.nix
Normal file
29
pkgs/os-specific/windows/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ newScope, crossLibcStdenv }: let
|
||||
|
||||
callPackage = newScope self;
|
||||
|
||||
self = {
|
||||
cygwinSetup = callPackage ./cygwin-setup { };
|
||||
|
||||
jom = callPackage ./jom { };
|
||||
|
||||
w32api = callPackage ./w32api { };
|
||||
|
||||
mingwrt = callPackage ./mingwrt { };
|
||||
mingw_runtime = self.mingwrt;
|
||||
|
||||
mingw_w64 = callPackage ./mingw-w64 {
|
||||
stdenv = crossLibcStdenv;
|
||||
};
|
||||
|
||||
mingw_w64_headers = callPackage ./mingw-w64/headers.nix { };
|
||||
|
||||
mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix { };
|
||||
|
||||
pthreads = callPackage ./pthread-w32 { };
|
||||
|
||||
wxMSW = callPackage ./wxMSW-2.8 { };
|
||||
|
||||
libgnurx = callPackage ./libgnurx { };
|
||||
};
|
||||
in self
|
|
@ -16,7 +16,7 @@ stdenv.mkDerivation {
|
|||
nativeBuildInputs = [ flex qmake4Hook ];
|
||||
|
||||
QTDIR = qt48;
|
||||
|
||||
|
||||
# cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cc.targetPrefix}windres";
|
||||
|
||||
preBuild = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ fetchurl }:
|
||||
|
||||
rec {
|
||||
version = "5.0.3";
|
||||
version = "5.0.4";
|
||||
name = "mingw-w64-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2";
|
||||
sha256 = "1d4wrjfdlq5xqpv9zg6ssw4lm8jnv6522xf7d6zbjygmkswisq1a";
|
||||
sha256 = "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
{ lib, fetchurl }:
|
||||
|
||||
rec {
|
||||
name = "mingwrt-3.20";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/MinGW/Base/mingw-rt/${name}-mingw32-src.tar.gz";
|
||||
sha256 = "02pydg1m8y35nxb4k34nlb5c341y2waq76z42mgdzlcf661r91pi";
|
||||
};
|
||||
|
||||
meta.platforms = [ lib.systems.inspect.isMinGW ];
|
||||
}
|
|
@ -1,7 +1,15 @@
|
|||
{ stdenv, callPackage }:
|
||||
{ stdenv, callPackage, lib, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mingwrt-5.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/MinGW/Base/mingw-rt/${name}-mingw32-src.tar.gz";
|
||||
sha256 = "02pydg1m8y35nxb4k34nlb5c341y2waq76z42mgdzlcf661r91p0";
|
||||
};
|
||||
|
||||
meta.platforms = [ lib.systems.inspect.isMinGW ];
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (callPackage ./common.nix {}) name src meta;
|
||||
dontStrip = true;
|
||||
hardeningDisable = [ "stackprotector" "fortify" ];
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{ stdenvNoCC, callPackage }:
|
||||
|
||||
let
|
||||
inherit (callPackage ./common.nix {}) name src meta;
|
||||
|
||||
in stdenvNoCC.mkDerivation {
|
||||
name = name + "-headers";
|
||||
|
||||
inherit src meta;
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R include $out
|
||||
'';
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ fetchurl, stdenv, hostPlatform, buildPlatform }:
|
||||
{ fetchurl, stdenv, hostPlatform, buildPlatform, mingwrt }:
|
||||
|
||||
# This file is tweaked for cross-compilation only.
|
||||
assert hostPlatform != buildPlatform;
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
|||
s/dlltool/i686-pc-mingw32-dlltool/g'
|
||||
'';
|
||||
|
||||
buildInputs = [ mingw_headers ];
|
||||
buildInputs = [ mingwrt ];
|
||||
|
||||
buildPhase = "make GC"; # to build the GNU C dll with C cleanup code
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
{ fetchurl, xz }:
|
||||
|
||||
rec {
|
||||
name = "w32api-3.17-2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-3.17/${name}-mingw32-src.tar.lzma";
|
||||
sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ xz ];
|
||||
|
||||
meta.platforms = [ lib.systems.inspect.isMinGW ];
|
||||
}
|
|
@ -1,6 +1,14 @@
|
|||
{ stdenv, callPackage }:
|
||||
{ stdenv, fetchurl, xz, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "w32api-3.17-2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-3.17/${name}-mingw32-src.tar.lzma";
|
||||
sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb";
|
||||
};
|
||||
|
||||
meta.platforms = [ lib.systems.inspect.isMinGW ];
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit (callPackage ./common.nix {}) name src nativeBuildInputs meta;
|
||||
dontStrip = true;
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{ stdenvNoCC, callPackage }:
|
||||
|
||||
let
|
||||
inherit (callPackage ./common.nix {}) name src meta;
|
||||
|
||||
in stdenvNoCC.mkDerivation {
|
||||
name = name + "-headers";
|
||||
|
||||
inherit src nativeBuildInputs meta;
|
||||
|
||||
phases = [ "unpackPhase" "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R include $out
|
||||
'';
|
||||
}
|
|
@ -14569,50 +14569,7 @@ with pkgs;
|
|||
|
||||
vndr = callPackage ../development/tools/vndr { };
|
||||
|
||||
windows = rec {
|
||||
cygwinSetup = callPackage ../os-specific/windows/cygwin-setup { };
|
||||
|
||||
jom = callPackage ../os-specific/windows/jom { };
|
||||
|
||||
w32api = callPackage ../os-specific/windows/w32api { };
|
||||
|
||||
w32api_headers = callPackage ../os-specific/windows/w32api/headers { };
|
||||
|
||||
mingw_runtime = callPackage ../os-specific/windows/mingwrt { };
|
||||
|
||||
mingw_runtime_headers = callPackage ../os-specific/windows/mingwrt/headers.nix { };
|
||||
|
||||
mingw_headers1 = buildEnv {
|
||||
name = "mingw-headers-1";
|
||||
paths = [ w32api_headers mingw_runtime_headers ];
|
||||
};
|
||||
|
||||
mingw_headers2 = buildEnv {
|
||||
name = "mingw-headers-2";
|
||||
paths = [ w32api mingw_runtime_headers ];
|
||||
};
|
||||
|
||||
mingw_headers3 = buildEnv {
|
||||
name = "mingw-headers-3";
|
||||
paths = [ w32api mingw_runtime ];
|
||||
};
|
||||
|
||||
mingw_w64 = callPackage ../os-specific/windows/mingw-w64 {
|
||||
stdenv = crossLibcStdenv;
|
||||
};
|
||||
|
||||
mingw_w64_headers = callPackage ../os-specific/windows/mingw-w64/headers.nix { };
|
||||
|
||||
mingw_w64_pthreads = callPackage ../os-specific/windows/mingw-w64/pthreads.nix { };
|
||||
|
||||
pthreads = callPackage ../os-specific/windows/pthread-w32 {
|
||||
mingw_headers = mingw_headers3;
|
||||
};
|
||||
|
||||
wxMSW = callPackage ../os-specific/windows/wxMSW-2.8 { };
|
||||
|
||||
libgnurx = callPackage ../os-specific/windows/libgnurx { };
|
||||
};
|
||||
windows = callPackages ../os-specific/windows {};
|
||||
|
||||
wirelesstools = callPackage ../os-specific/linux/wireless-tools { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue