From 37af0477c195c7c73689aa90130f077375dbb615 Mon Sep 17 00:00:00 2001 From: Nicolas Pouillard Date: Thu, 15 Jan 2015 01:15:05 +0100 Subject: [PATCH] [nix] shell.nix is now a function --- shell.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/shell.nix b/shell.nix index 8730cbd..81e9cdd 100644 --- a/shell.nix +++ b/shell.nix @@ -1,11 +1,13 @@ -let pkgs = (import {}); - haskellPackages = pkgs.recurseIntoAttrs (pkgs.haskellPackages.override { - extension = self : super : - let callPackage = self.callPackage; - in { - RFC1751 = callPackage ./nix/RFC1751.nix {}; - thisPackage = haskellPackages.callPackage (import ./default.nix) {}; - };}); +{ pkgs ? import {} }: +let haskellPackages = + pkgs.recurseIntoAttrs + (pkgs.haskellPackages.override { + extension = self: super: + { + RFC1751 = self.callPackage ./nix/RFC1751.nix {}; + thisPackage = haskellPackages.callPackage (import ./default.nix) {}; + }; + }); in pkgs.lib.overrideDerivation haskellPackages.thisPackage (old: { buildInputs = old.buildInputs ++ [ haskellPackages.cabalInstall