diff options
| author | Inari Listenmaa <inari.listenmaa@gmail.com> | 2018-05-04 17:23:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-04 17:23:53 +0200 |
| commit | 1c7e99cdca020ccb1e55b067961813a7752eba3b (patch) | |
| tree | 397619af806b1a0937e8f731aa5187f258d48066 | |
| parent | bb5b21b925c898bd1962ec7563e2d8913a2c73a7 (diff) | |
| parent | 42bcb5015467a359ae5f1acd180d2cab244d63a3 (diff) | |
Merge pull request #37 from mbrock/master
Fix the Nix build
| -rw-r--r-- | default.nix | 8 | ||||
| -rw-r--r-- | gf.nix | 20 |
2 files changed, 22 insertions, 6 deletions
diff --git a/default.nix b/default.nix index 98cae21a4..bfa85ab7c 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,8 @@ { mkDerivation, alex, array, base, bytestring, Cabal, cgi , containers, directory, exceptions, filepath, happy, haskeline -, HTF, httpd-shed, HUnit, json, lifted-base, mtl, network -, network-uri, old-locale, parallel, pretty, process, random -, stdenv, terminfo, time, time-compat, unix, utf8-string +, HTF, httpd-shed, HUnit, json, mtl, network, network-uri +, old-locale, parallel, pretty, process, random, stdenv, terminfo +, time, time-compat, unix, utf8-string }: mkDerivation { pname = "gf"; @@ -18,7 +18,7 @@ mkDerivation { utf8-string ]; libraryToolDepends = [ alex happy ]; - executableHaskellDepends = [ base containers lifted-base mtl ]; + executableHaskellDepends = [ base ]; testHaskellDepends = [ base Cabal directory filepath HTF HUnit process ]; @@ -1,3 +1,19 @@ -let pkgs = import <nixpkgs> {}; in rec { - gf = pkgs.haskellPackages.callPackage ./default.nix {}; +let + # We import the package hierarchy from the NIX_PATH. + pkgs = import <nixpkgs> {}; + + # + # 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) {}; } |
