Skip to content

Commit

Permalink
Add haskellNixJsonOverride argument to default.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed May 17, 2019
1 parent e2dce80 commit 2a785cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion default.nix
Expand Up @@ -6,6 +6,7 @@
, application ? ""
# Override nixpkgs-src.json to a file in your repo
, nixpkgsJsonOverride ? ""
, haskellNixJsonOverride ? ""
}:

let
Expand Down Expand Up @@ -52,7 +53,7 @@ let
# stack.yaml files.
package = (haskell { pkgs = commonLib.pkgsDefault; }).nix-tools;
# A different haskell infrastructure
haskell = import ./haskell.nix;
haskell = (import ./haskell.nix) { inherit haskellNixJsonOverride; };
# Script to invoke nix-tools stack-to-nix on a repo.
regeneratePackages = commonLib.pkgsDefault.callPackage ./nix-tools-regenerate.nix {
nix-tools = package;
Expand Down
6 changes: 5 additions & 1 deletion haskell.nix
@@ -1,11 +1,15 @@
{ haskellNixJsonOverride } :
{ pkgs }:
let

overrideWith = import ./fetch-tarball-with-override.nix;
haskellNixJson = if (haskellNixJsonOverride != "")
then haskellNixJsonOverride
else ./pins/haskell-nix.json;

in
# To update this pin, run ./pins/update-defaults.sh
import (overrideWith "haskell" ./pins/haskell-nix.json) {
import (overrideWith "haskell" haskellNixJson) {
inherit pkgs;
# hackageSourceJSON = ./pins/hackage-nix.json;
# stackageSourceJSON = ./pins/stackage-nix.json;
Expand Down

0 comments on commit 2a785cf

Please sign in to comment.