[commit: ghc] master: Extend ghcHEAD derivation rather than make a new derivation (#486) (dc8032e)

git at git.haskell.org git at git.haskell.org
Tue Oct 23 20:12:34 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/dc8032e261f7205a70e7fc738656374c127bb476/ghc

>---------------------------------------------------------------

commit dc8032e261f7205a70e7fc738656374c127bb476
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Tue Dec 5 21:23:50 2017 +0000

    Extend ghcHEAD derivation rather than make a new derivation (#486)
    
    This allows you to use configurePhase/buildPhase as usual and
    set the right configureFlags rather than end up with a broken
    executable.


>---------------------------------------------------------------

dc8032e261f7205a70e7fc738656374c127bb476
 shell.nix | 28 +++++++++-------------------
 1 file changed, 9 insertions(+), 19 deletions(-)

diff --git a/shell.nix b/shell.nix
index e9a5ecc..f15f72b 100644
--- a/shell.nix
+++ b/shell.nix
@@ -16,6 +16,7 @@ let
            || baseName == ".stack-work"
            || baseName == "config.log"
            || baseName == "config.status"
+           || baseName == "shell.nix"
            || nixpkgs.lib.hasSuffix ".sh" baseName
            || !(nixpkgs.lib.cleanSourceFilter path type)) ;
 
@@ -39,23 +40,12 @@ let
       }; };
 
 in
-
-  nixpkgs.stdenv.mkDerivation {
-    name = "ghc-dev";
-    buildInputs = [
+  nixpkgs.lib.overrideDerivation nixpkgs.haskell.packages.ghcHEAD.ghc
+    (drv: {
+      name = "ghc-dev";
+      buildInputs = drv.buildInputs ++ [
                     hadrianPackages.hadrian
-                    nixpkgs.haskell.compiler.ghc821
-                    haskellPackages.alex
-                    haskellPackages.happy
-                    nixpkgs.python3
-                    nixpkgs.git
-                    nixpkgs.autoconf
-                    nixpkgs.automake
-                    nixpkgs.perl
-                    nixpkgs.gcc
-                    nixpkgs.python3Packages.sphinx
-                    nixpkgs.ncurses
-                    nixpkgs.m4
-                    nixpkgs.gmp
-                    nixpkgs.file ];
-  }
+                    nixpkgs.arcanist
+                    ];
+    })
+



More information about the ghc-commits mailing list