gcc7,gcc8: move dependencies to common/dependencies.nix
This commit is contained in:
@@ -165,33 +165,29 @@ stdenv.mkDerivation ({
|
||||
inherit noSysDirs staticCompiler crossStageStatic
|
||||
libcCross crossMingw;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
++ (optional buildPlatform.isDarwin gnused)
|
||||
inherit (import ../common/dependencies.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
buildPackages
|
||||
targetPackages
|
||||
crossStageStatic
|
||||
threadsCross
|
||||
version
|
||||
texinfo
|
||||
which
|
||||
gettext
|
||||
gnused
|
||||
patchelf
|
||||
gmp
|
||||
mpfr
|
||||
libmpc
|
||||
isl
|
||||
zlib
|
||||
zip
|
||||
perl
|
||||
;
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
(
|
||||
if hostPlatform == buildPlatform then [
|
||||
targetPackages.stdenv.cc.bintools # newly-built gcc will be used
|
||||
] else assert targetPlatform == hostPlatform; [ # build != host == target
|
||||
stdenv.cc
|
||||
]
|
||||
)
|
||||
++ optional targetPlatform.isLinux patchelf;
|
||||
|
||||
buildInputs = [
|
||||
gmp mpfr libmpc
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
|
||||
}) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
@@ -147,33 +147,29 @@ stdenv.mkDerivation ({
|
||||
inherit noSysDirs staticCompiler crossStageStatic
|
||||
libcCross crossMingw;
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [ texinfo which gettext ]
|
||||
++ (optional (perl != null) perl)
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
++ (optional buildPlatform.isDarwin gnused)
|
||||
inherit (import ../common/dependencies.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
buildPackages
|
||||
targetPackages
|
||||
crossStageStatic
|
||||
threadsCross
|
||||
version
|
||||
texinfo
|
||||
which
|
||||
gettext
|
||||
gnused
|
||||
patchelf
|
||||
gmp
|
||||
mpfr
|
||||
libmpc
|
||||
isl
|
||||
zlib
|
||||
zip
|
||||
perl
|
||||
;
|
||||
|
||||
# For building runtime libs
|
||||
depsBuildTarget =
|
||||
(
|
||||
if hostPlatform == buildPlatform then [
|
||||
targetPackages.stdenv.cc.bintools # newly-built gcc will be used
|
||||
] else assert targetPlatform == hostPlatform; [ # build != host == target
|
||||
stdenv.cc
|
||||
]
|
||||
)
|
||||
++ optional targetPlatform.isLinux patchelf;
|
||||
|
||||
buildInputs = [
|
||||
gmp mpfr libmpc
|
||||
targetPackages.stdenv.cc.bintools # For linking code at run-time
|
||||
] ++ (optional (isl != null) isl)
|
||||
++ (optional (zlib != null) zlib)
|
||||
;
|
||||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
|
||||
}) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
|
||||
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
, texinfo
|
||||
, which
|
||||
, gettext
|
||||
, pkg-config
|
||||
, pkg-config ? null
|
||||
, gnused
|
||||
, patchelf
|
||||
, gmp
|
||||
@@ -17,11 +17,11 @@
|
||||
, zlib ? null
|
||||
, gnatboot ? null
|
||||
, flex ? null
|
||||
, boehmgc
|
||||
, zip
|
||||
, unzip
|
||||
, gtk2
|
||||
, libart_lgpl
|
||||
, boehmgc ? null
|
||||
, zip ? null
|
||||
, unzip ? null
|
||||
, gtk2 ? null
|
||||
, libart_lgpl ? null
|
||||
, perl ? null
|
||||
, xlibs ? null
|
||||
, langJava ? false
|
||||
@@ -47,7 +47,7 @@ in
|
||||
]
|
||||
++ optionals (perl != null) [ perl ]
|
||||
++ optionals javaAwtGtk [ pkg-config ]
|
||||
++ optionals (with stdenv.targetPlatform; isVc4 || isRedox) [ flex ]
|
||||
++ optionals (with stdenv.targetPlatform; isVc4 || isRedox && flex != null) [ flex ]
|
||||
++ optionals langAda [ gnatboot ]
|
||||
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
|
||||
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
|
||||
|
||||
Reference in New Issue
Block a user