[commit: hadrian] master: Pin nixpkgs and all-cabal-hashes in shell.nix (#511) (37bd95f)

git at git.haskell.org git at git.haskell.org
Wed Apr 25 23:20:01 UTC 2018


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

On branch  : master
Link       : http://git.haskell.org/hadrian.git/commitdiff/37bd95fee83b50c2567914a6e6c2a4cc73803f30

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

commit 37bd95fee83b50c2567914a6e6c2a4cc73803f30
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Wed Feb 28 18:09:34 2018 +0000

    Pin nixpkgs and all-cabal-hashes in shell.nix (#511)
    
    * Pin shell.nix
    
    Also adds a new option to build `cabal-install` HEAD which is
    sometimes useful.
    
    * Bump QuickCheck bound
    
    * Remove cabal-install which snuck in


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

37bd95fee83b50c2567914a6e6c2a4cc73803f30
 hadrian.cabal |  2 +-
 shell.nix     | 38 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/hadrian.cabal b/hadrian.cabal
index fef9bd9..84aecef 100644
--- a/hadrian.cabal
+++ b/hadrian.cabal
@@ -128,7 +128,7 @@ executable hadrian
                        , directory            >= 1.2     && < 1.4
                        , extra                >= 1.4.7
                        , mtl                  == 2.2.*
-                       , QuickCheck           >= 2.6     && < 2.10
+                       , QuickCheck           >= 2.6     && < 2.11
                        , shake                == 0.16.*
                        , transformers         >= 0.4     && < 0.6
                        , unordered-containers >= 0.2.1   && < 0.3
diff --git a/shell.nix b/shell.nix
index d8767cd..1b17905 100644
--- a/shell.nix
+++ b/shell.nix
@@ -2,9 +2,26 @@
 # by only invoking hadrian.
 
 
-{ nixpkgs ? import <nixpkgs> {} }:
+{ _nixpkgs ? import <nixpkgs> {} }:
 
 let
+
+  nixpkgs = import (_nixpkgs.fetchFromGitHub {
+    owner = "NixOS";
+    repo = "nixpkgs";
+    rev = "e7a327da5cffdf5e77e1924906a4f0983591bd3e";
+    sha256 = "1xzil4mayhggg2miwspbk12nihlszg0y4n6i4qacrxql5n75f0hr";
+  }){ overlays = [cabalHashes]; };
+
+
+
+  cabalHashes = sel: super: {
+    all-cabal-hashes = super.fetchurl {
+      url    = "https://github.com/commercialhaskell/all-cabal-hashes/archive/b2b93ae610f5f1b51d22b191f972dc3dec8f94c6.tar.gz";
+      sha256 = "0bffclpqbw62xff36qlzxghr042mhv0m06k5ml4298w6fv7ly1xw";
+    };
+  };
+
   haskellPackages = nixpkgs.haskell.packages.ghc822;
 
   removeBuild = path: type:
@@ -28,7 +45,10 @@ let
         localPackage = name: path: self.callCabal2nix name (filterSrc path) {};
       in {
         hadrian = localPackage "hadrian" ./. ;
-        shake = self.callHackage "shake" "0.16" {};
+        happy = nixpkgs.haskell.lib.dontCheck (super.happy);
+        shake = self.callHackage "shake" "0.16.2" {};
+        extra = self.callHackage "extra" "1.6.4" {};
+        QuickCheck = self.callHackage "QuickCheck" "2.10" {};
         Cabal = localPackage "Cabal" ./../libraries/Cabal/Cabal ;
         filepath = localPackage "filepath" ./../libraries/filepath ;
         text = localPackage "text" ./../libraries/text  ;
@@ -39,6 +59,15 @@ let
         directory = localPackage "directory" ./../libraries/directory ;
       }; };
 
+  cabalPackages = nixpkgs.haskell.packages.ghc822.override {
+    overrides = self: super: let
+        localPackage = name: path: self.callCabal2nix name (filterSrc path) {};
+      in {
+        Cabal = localPackage "Cabal" ./../../cabal/Cabal ;
+        cabal-install = self.callPackage ./../../cabal/cabal-install.nix {};
+      }; };
+
+
 in
   nixpkgs.lib.overrideDerivation nixpkgs.haskell.packages.ghcHEAD.ghc
     (drv: {
@@ -47,6 +76,11 @@ in
         [ hadrianPackages.hadrian
           nixpkgs.arcanist
           nixpkgs.python3Packages.sphinx
+          nixpkgs.texlive.combined.scheme-basic
+          (nixpkgs.haskell.packages.ghc822.ghcWithPackages
+            (ps: [ps.html ps.regex-compat ps.dump-core]))
+
+          #cabalPackages.cabal-install
         ];
     })
 



More information about the ghc-commits mailing list