gcc7,gcc8: move dependencies to common/dependencies.nix

This commit is contained in:
Artturin
2023-02-08 04:07:48 +02:00
parent 18f9f26a79
commit c4269cd7bf
3 changed files with 51 additions and 59 deletions
+22 -26
View File
@@ -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";
+22 -26
View File
@@ -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.