diff options
author | John Ericson <Ericson2314@yahoo.com> | 2018-05-14 21:05:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 21:05:44 -0400 |
commit | 232bc24b568f09bdc5b2514ca5c0f8cde2b3e82a (patch) | |
tree | dc28d16b9ceb54735c980f1c0cf9bd983b3a4317 /pkgs/os-specific/windows | |
parent | 5288fbd60b15c14f8d3acaa87bd5acb51bd26d40 (diff) | |
parent | 84868b8b06e54f0d1a9eb3140ed80b4d697f35d3 (diff) |
Merge pull request #40530 from obsidiansystems/mingw-cleanup
MinGW, Hurd: Clean ups and crossConfig removal
Diffstat (limited to 'pkgs/os-specific/windows')
-rw-r--r-- | pkgs/os-specific/windows/mingwrt/common.nix | 12 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mingwrt/default.nix | 32 | ||||
-rw-r--r-- | pkgs/os-specific/windows/mingwrt/headers.nix | 17 | ||||
-rw-r--r-- | pkgs/os-specific/windows/w32api/common.nix | 14 | ||||
-rw-r--r-- | pkgs/os-specific/windows/w32api/default.nix | 34 | ||||
-rw-r--r-- | pkgs/os-specific/windows/w32api/headers.nix | 17 |
6 files changed, 69 insertions, 57 deletions
diff --git a/pkgs/os-specific/windows/mingwrt/common.nix b/pkgs/os-specific/windows/mingwrt/common.nix new file mode 100644 index 000000000000..7dc2ae56aa84 --- /dev/null +++ b/pkgs/os-specific/windows/mingwrt/common.nix @@ -0,0 +1,12 @@ +{ 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 ]; +} diff --git a/pkgs/os-specific/windows/mingwrt/default.nix b/pkgs/os-specific/windows/mingwrt/default.nix index 98461d690d92..3429f7564ade 100644 --- a/pkgs/os-specific/windows/mingwrt/default.nix +++ b/pkgs/os-specific/windows/mingwrt/default.nix @@ -1,29 +1,7 @@ -{stdenv, fetchurl, binutils ? null, gccCross ? null, onlyHeaders ? false}: - -let - name = "mingwrt-3.20"; -in -stdenv.mkDerivation (rec { - inherit name; - - src = fetchurl { - url = "mirror://sourceforge/mingw/MinGW/Base/mingw-rt/${name}-mingw32-src.tar.gz"; - sha256 = "02pydg1m8y35nxb4k34nlb5c341y2waq76z42mgdzlcf661r91pi"; - }; - -} // -(if onlyHeaders then { - name = name + "-headers"; - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' - mkdir -p $out - cp -R include $out - ''; -} else { - buildInputs = [ gccCross binutils ]; - - crossConfig = gccCross.crossConfig; +{ stdenv, callPackage }: +stdenv.mkDerivation { + inherit (callPackage ./common.nix {}) name src meta; dontStrip = true; -}) -) + hardeningDisable = [ "stackprotector" "fortify" ]; +} diff --git a/pkgs/os-specific/windows/mingwrt/headers.nix b/pkgs/os-specific/windows/mingwrt/headers.nix new file mode 100644 index 000000000000..51180af0fc73 --- /dev/null +++ b/pkgs/os-specific/windows/mingwrt/headers.nix @@ -0,0 +1,17 @@ +{ 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 + ''; +} diff --git a/pkgs/os-specific/windows/w32api/common.nix b/pkgs/os-specific/windows/w32api/common.nix new file mode 100644 index 000000000000..273ae2c8df4b --- /dev/null +++ b/pkgs/os-specific/windows/w32api/common.nix @@ -0,0 +1,14 @@ +{ 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 ]; +} diff --git a/pkgs/os-specific/windows/w32api/default.nix b/pkgs/os-specific/windows/w32api/default.nix index 3443fff9668d..51b88201998c 100644 --- a/pkgs/os-specific/windows/w32api/default.nix +++ b/pkgs/os-specific/windows/w32api/default.nix @@ -1,32 +1,6 @@ -{ stdenv, fetchurl, xz, binutils ? null -, gccCross ? null, onlyHeaders ? false }: - -let - name = "w32api-3.17-2"; -in -stdenv.mkDerivation ({ - inherit name; - - src = fetchurl { - url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-3.17/${name}-mingw32-src.tar.lzma"; - sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb"; - }; - - nativeBuildInputs = [ xz ]; - -} // -(if onlyHeaders then { - name = name + "-headers"; - phases = [ "unpackPhase" "installPhase" ]; - installPhase = '' - mkdir -p $out - cp -R include $out - ''; -} else { - buildInputs = [ gccCross binutils ]; - - crossConfig = gccCross.crossConfig; +{ stdenv, callPackage }: +stdenv.mkDerivation { + inherit (callPackage ./common.nix {}) name src nativeBuildInputs meta; dontStrip = true; -}) -) +} diff --git a/pkgs/os-specific/windows/w32api/headers.nix b/pkgs/os-specific/windows/w32api/headers.nix new file mode 100644 index 000000000000..3083118bb366 --- /dev/null +++ b/pkgs/os-specific/windows/w32api/headers.nix @@ -0,0 +1,17 @@ +{ 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 + ''; +} |