Fix the Nix build

We use the Nix "jailbreak" function to ignore the upper bounds
on the CGI package dependency.
This commit is contained in:
Mikael Brockman
2018-05-03 15:40:08 +03:00
parent bb5b21b925
commit 42bcb50154
2 changed files with 22 additions and 6 deletions

20
gf.nix
View File

@@ -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) {};
}