From b05f2326d6609ce9de28a6a761d2b5f0c5e4bc0f Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 6 Apr 2020 15:28:06 -0400 Subject: [PATCH] Don't require caller to know we have an overlay --- nix/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index 349c836..64d71bb 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,12 +1,17 @@ -{ pkgs ? import <nixpkgs> { overlays = [ (import ./overlay.nix) ]; } }: +{ pkgs ? import <nixpkgs> { } }: let + # Get our overlay in place regardless of whether a value is passed for pkgs. + # The build fails without it and it's unreasonable to expect our caller to + # know to apply it. + nixpkgs = import pkgs.path { overlays = [ (import ./overlay.nix) ]; }; + # Pin a particular version of haskell.nix. The particular version isn't # special. It's just recent at the time this expression was written and it # is known to work with PaymentServer. It could be bumped if necessary but # this would probably only happen as a result of bumping the resolver in # stack.yaml. - haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/0cb32e695d7014908fb01fd7e3d225ea33dbdc98.tar.gz) { inherit pkgs; }; + haskell = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/0cb32e695d7014908fb01fd7e3d225ea33dbdc98.tar.gz) { pkgs = nixpkgs; }; pkgSet = haskell.mkStackPkgSet { stack-pkgs = import ./pkgs.nix; -- GitLab