forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mingw-w64: Clean up, especially clarifying staging
- Loading branch information
1 parent
eddbb6c
commit f36926f
Showing
5 changed files
with
55 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ fetchurl }: | ||
|
||
rec { | ||
version = "4.0.6"; | ||
name = "mingw-w64-${version}"; | ||
|
||
src = fetchurl { | ||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2"; | ||
sha256 = "0p01vm5kx1ixc08402z94g1alip4vx66gjpvyi9maqyqn2a76h0c"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,6 @@ | ||
{ stdenv, fetchurl, binutils ? null, gccCross ? null | ||
, onlyHeaders ? false | ||
, onlyPthreads ? false | ||
}: | ||
|
||
let | ||
version = "4.0.6"; | ||
name = "mingw-w64-${version}"; | ||
in | ||
stdenv.mkDerivation ({ | ||
inherit name; | ||
|
||
src = fetchurl { | ||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2"; | ||
sha256 = "0p01vm5kx1ixc08402z94g1alip4vx66gjpvyi9maqyqn2a76h0c"; | ||
}; | ||
} // | ||
(if onlyHeaders then { | ||
name = name + "-headers"; | ||
preConfigure = '' | ||
cd mingw-w64-headers | ||
''; | ||
configureFlags = "--without-crt"; | ||
} else if onlyPthreads then { | ||
name = name + "-pthreads"; | ||
preConfigure = '' | ||
cd mingw-w64-libraries/winpthreads | ||
''; | ||
} else { | ||
buildInputs = [ gccCross binutils ]; | ||
|
||
crossConfig = gccCross.crossConfig; | ||
{ stdenv, callPackage }: | ||
|
||
stdenv.mkDerivation { | ||
inherit (callPackage ./common.nix {}) name src; | ||
dontStrip = true; | ||
}) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ stdenvNoCC, callPackage }: | ||
|
||
let | ||
inherit (callPackage ./common.nix {}) name src; | ||
|
||
in stdenvNoCC.mkDerivation { | ||
name = name + "-headers"; | ||
inherit src; | ||
|
||
preConfigure = '' | ||
cd mingw-w64-headers | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ stdenvNoCC, callPackage }: | ||
|
||
let | ||
inherit (callPackage ./common.nix {}) name src; | ||
|
||
in stdenvNoCC.mkDerivation { | ||
name = name + "-pthreads"; | ||
inherit src; | ||
|
||
preConfigure = '' | ||
cd mingw-w64-libraries/winpthreads | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters