ghc, ghcjs: Get rid of extraneous alex, happy, and hscolour args

The compilers themselves can pull them from `bootPkgs`, where they
should always come from anyways. This enforces that, simplifies that
code, and allows use to avoid more `rec { ... }` too.
This commit is contained in:
John Ericson 2018-09-24 19:59:17 -04:00
parent 5779fdb3d0
commit e6a476c862
8 changed files with 26 additions and 33 deletions

View file

@ -1,7 +1,7 @@
{ stdenv, targetPackages
# build-tools
, bootPkgs, hscolour
, bootPkgs
, coreutils, fetchurl, perl
, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, libxml2, libxslt
@ -142,7 +142,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42
ghc hscolour
ghc bootPkgs.hscolour
];
# For building runtime libs

View file

@ -1,7 +1,7 @@
{ stdenv, targetPackages
# build-tools
, bootPkgs, hscolour
, bootPkgs
, coreutils, fetchpatch, fetchurl, perl, sphinx
, libiconv ? null, ncurses
@ -144,7 +144,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
perl sphinx
ghc hscolour
ghc bootPkgs.hscolour
];
# For building runtime libs

View file

@ -1,7 +1,7 @@
{ stdenv, targetPackages
# build-tools
, bootPkgs, alex, happy, hscolour
, bootPkgs
, autoconf, autoreconfHook, automake, coreutils, fetchurl, fetchpatch, perl, python3, sphinx
, runCommand
@ -182,7 +182,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
autoconf autoreconfHook automake perl python3 sphinx
ghc alex happy hscolour
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs

View file

@ -1,7 +1,7 @@
{ stdenv, targetPackages
# build-tools
, bootPkgs, alex, happy, hscolour
, bootPkgs
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4
, libiconv ? null, ncurses
@ -180,7 +180,7 @@ stdenv.mkDerivation (rec {
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc alex happy hscolour
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs

View file

@ -1,7 +1,7 @@
{ stdenv, targetPackages
# build-tools
, bootPkgs, alex, happy, hscolour
, bootPkgs
, autoconf, automake, coreutils, fetchurl, perl, python3, m4
, libiconv ? null, ncurses
@ -163,7 +163,7 @@ stdenv.mkDerivation (rec {
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc alex happy hscolour
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs

View file

@ -1,7 +1,7 @@
{ stdenv, targetPackages
# build-tools
, bootPkgs, alex, happy, hscolour
, bootPkgs
, autoconf, automake, coreutils, fetchgit, perl, python3, m4
, libiconv ? null, ncurses
@ -150,7 +150,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc alex happy hscolour
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
];
# For building runtime libs

View file

@ -4,8 +4,6 @@
, ghcjsSrcJson ? null
, ghcjsSrc ? fetchgit (builtins.fromJSON (builtins.readFile ghcjsSrcJson))
, bootPkgs
, alex
, happy
, stage0
, haskellLib
, cabal-install
@ -24,8 +22,8 @@
let
passthru = {
configuredSrc = callPackage ./configured-ghcjs-src.nix {
inherit ghcjsSrc alex happy;
inherit (bootPkgs) ghc;
inherit ghcjsSrc;
inherit (bootPkgs) ghc alex happy;
};
genStage0 = callPackage ./mk-stage0.nix { inherit (passthru) configuredSrc; };
bootPkgs = bootPkgs.extend (lib.foldr lib.composeExtensions (_:_:{}) [
@ -34,7 +32,10 @@ let
inherit (self) callPackage;
})
(callPackage ./common-overrides.nix { inherit haskellLib alex happy; })
(callPackage ./common-overrides.nix {
inherit haskellLib;
inherit (bootPkgs) alex happy;
})
ghcjsDepOverrides
]);

View file

@ -47,41 +47,35 @@ in {
ghc7103Binary = callPackage ../development/compilers/ghc/7.10.3-binary.nix { };
ghc821Binary = callPackage ../development/compilers/ghc/8.2.1-binary.nix { };
ghc7103 = callPackage ../development/compilers/ghc/7.10.3.nix rec {
ghc7103 = callPackage ../development/compilers/ghc/7.10.3.nix {
bootPkgs = packages.ghc7103Binary;
inherit (bootPkgs) hscolour;
buildLlvmPackages = buildPackages.llvmPackages_35;
llvmPackages = pkgs.llvmPackages_35;
};
ghc802 = callPackage ../development/compilers/ghc/8.0.2.nix rec {
ghc802 = callPackage ../development/compilers/ghc/8.0.2.nix {
bootPkgs = packages.ghc7103Binary;
inherit (bootPkgs) hscolour;
sphinx = pkgs.python27Packages.sphinx;
buildLlvmPackages = buildPackages.llvmPackages_37;
llvmPackages = pkgs.llvmPackages_37;
};
ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix rec {
ghc822 = callPackage ../development/compilers/ghc/8.2.2.nix {
bootPkgs = packages.ghc821Binary;
inherit (bootPkgs) hscolour alex happy;
sphinx = pkgs.python3Packages.sphinx;
buildLlvmPackages = buildPackages.llvmPackages_39;
llvmPackages = pkgs.llvmPackages_39;
};
ghc843 = callPackage ../development/compilers/ghc/8.4.3.nix rec {
ghc843 = callPackage ../development/compilers/ghc/8.4.3.nix {
bootPkgs = packages.ghc821Binary;
inherit (bootPkgs) alex happy hscolour;
buildLlvmPackages = buildPackages.llvmPackages_5;
llvmPackages = pkgs.llvmPackages_5;
};
ghc861 = callPackage ../development/compilers/ghc/8.6.1.nix rec {
ghc861 = callPackage ../development/compilers/ghc/8.6.1.nix {
bootPkgs = packages.ghc822;
inherit (bootPkgs) alex happy hscolour;
buildLlvmPackages = buildPackages.llvmPackages_6;
llvmPackages = pkgs.llvmPackages_6;
};
ghcHEAD = callPackage ../development/compilers/ghc/head.nix rec {
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
bootPkgs = packages.ghc821Binary;
inherit (bootPkgs) alex happy hscolour;
buildLlvmPackages = buildPackages.llvmPackages_5;
llvmPackages = pkgs.llvmPackages_5;
};
@ -94,15 +88,13 @@ in {
bootPkgs = packages.ghc802;
inherit (pkgs) cabal-install;
};
ghcjs82 = callPackage ../development/compilers/ghcjs-ng rec {
ghcjs82 = callPackage ../development/compilers/ghcjs-ng {
bootPkgs = packages.ghc822;
inherit (bootPkgs) alex happy;
ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.2/git.json;
stage0 = ../development/compilers/ghcjs-ng/8.2/stage0.nix;
};
ghcjs84 = callPackage ../development/compilers/ghcjs-ng rec {
ghcjs84 = callPackage ../development/compilers/ghcjs-ng {
bootPkgs = packages.ghc843;
inherit (bootPkgs) alex happy;
ghcjsSrcJson = ../development/compilers/ghcjs-ng/8.4/git.json;
stage0 = ../development/compilers/ghcjs-ng/8.4/stage0.nix;
ghcjsDepOverrides = callPackage ../development/compilers/ghcjs-ng/8.4/dep-overrides.nix {};