From 42bcb5015467a359ae5f1acd180d2cab244d63a3 Mon Sep 17 00:00:00 2001 From: Mikael Brockman Date: Thu, 3 May 2018 15:40:08 +0300 Subject: Fix the Nix build We use the Nix "jailbreak" function to ignore the upper bounds on the CGI package dependency. --- gf.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'gf.nix') diff --git a/gf.nix b/gf.nix index 4b7ed2092..2926651f3 100644 --- a/gf.nix +++ b/gf.nix @@ -1,3 +1,19 @@ -let pkgs = import {}; in rec { - gf = pkgs.haskellPackages.callPackage ./default.nix {}; +let + # We import the package hierarchy from the NIX_PATH. + pkgs = import {}; + + # + # The `cgi` package has some out-of-date upper bounds. + # Instead of fixing that upstream, we can use the "jailbreak" + # function in Nix, which patches away the upper bounds. + # + # This isn't ideal, but it lets us build the dependency. + # + jailbreak = pkgs.haskell.lib.doJailbreak; + haskellPackages = pkgs.haskellPackages.extend (self: super: { + cgi = jailbreak super.cgi; + }); + +in { + gf = haskellPackages.callPackage (import ./default.nix) {}; } -- cgit v1.2.3