Update hnix to build with ghc865; however, hnix-store does not build

This commit is contained in:
John Wiegley 2020-01-08 18:34:08 -08:00
parent 6c9c7c310c
commit 0478ab6ba6
2 changed files with 56 additions and 28 deletions

@ -1 +1 @@
Subproject commit b18a4898ff990c0b8ec1d3571d23a054a7d4c5cd Subproject commit 61e816217bfdfffd39c130c7cd24f07e640098fc

View File

@ -1,4 +1,4 @@
{ compiler ? "ghc864" { compiler ? "ghc865"
, doBenchmark ? false , doBenchmark ? false
, doTracing ? false , doTracing ? false
@ -8,27 +8,53 @@
, withHoogle ? true , withHoogle ? true
, rev ? "c4adeddb5f8e945517068968d06ea838b7c24bd3" , rev ? "7e8454fb856573967a70f61116e15f879f2e3f6a"
, pkgs ? , pkgs ?
if builtins.compareVersions builtins.nixVersion "2.0" < 0 if builtins.compareVersions builtins.nixVersion "2.0" < 0
then abort "hnix requires at least nix 2.0" then abort "hnix requires at least nix 2.0"
else import (builtins.fetchGit { else import (builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
inherit rev; }) { inherit rev; }) {
config.allowUnfree = true; config.allowUnfree = true;
config.allowBroken = false; config.allowBroken = true;
config.packageOverrides = pkgs: rec { # config.packageOverrides = pkgs: rec {
nix = pkgs.nixUnstable.overrideDerivation (attrs: { # nix = pkgs.nixStable.overrideDerivation (attrs: with pkgs; rec {
src = if builtins.pathExists ./data/nix/version then data/nix else throw "data/nix doesn't seem to contain the nix source. You may want to run git submodule update --init."; # src = if builtins.pathExists ./data/nix/.version
configureFlags = attrs.configureFlags ++ [ "--disable-doc-gen" ]; # then data/nix
buildInputs = attrs.buildInputs ++ # else throw "data/nix doesn't seem to contain the nix source. You may want to run git submodule update --init.";
[ pkgs.editline.dev
]; # enableParallelBuilding = true;
outputs = builtins.filter (s: s != "doc" && s != "man" ) attrs.outputs;
}); # configureFlags =
}; # [ "--disable-doc-gen"
} # "--enable-gc"
# ];
# buildInputs =
# [ bison
# flex
# autoconf-archive
# autoreconfHook
# curl
# bzip2 xz brotli editline
# openssl pkgconfig sqlite boehmgc
# boost
# git
# mercurial
# ]
# ++ lib.optionals stdenv.isLinux [libseccomp utillinuxMinimal]
# ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
# ++ lib.optional (stdenv.isLinux || stdenv.isDarwin)
# (aws-sdk-cpp.override {
# apis = ["s3" "transfer"];
# customMemoryManagement = false;
# });
# outputs = builtins.filter (s: s != "doc" && s != "man" ) attrs.outputs;
# });
# };
}
, mkDerivation ? null , mkDerivation ? null
}: }:
@ -54,27 +80,29 @@ let
aeson = addBuildDepend super.aeson self.contravariant; aeson = addBuildDepend super.aeson self.contravariant;
base-compat-batteries = addBuildDepend super.base-compat-batteries self.contravariant; base-compat-batteries = addBuildDepend super.base-compat-batteries self.contravariant;
mono-traversable = dontCheck super.mono-traversable; mono-traversable = dontCheck super.mono-traversable;
these = doJailbreak super.these; regex-tdfa-text = doJailbreak super.regex-tdfa-text;
multistate = doJailbreak (overrideCabal super.multistate (attrs: { broken = false; })); these = doJailbreak super.these;
butcher = doJailbreak (overrideCabal super.butcher (attrs: { broken = false; })); semialign-indexed = doJailbreak super.semialign-indexed;
multistate = doJailbreak (overrideCabal super.multistate (attrs: { broken = false; }));
butcher = doJailbreak (overrideCabal super.butcher (attrs: { broken = false; }));
brittany = doJailbreak (self.callCabal2nix "brittany" brittany = doJailbreak (self.callCabal2nix "brittany"
(pkgs.fetchFromGitHub { (pkgs.fetchFromGitHub {
owner = "lspitzner"; owner = "lspitzner";
repo = "brittany"; repo = "brittany";
rev = "6c187da8f8166d595f36d6aaf419370283b3d1e9"; rev = "af227a797d588eda936280dc1c3b0b376735335e";
sha256 = "0nmnxprbwws3w1sh63p80qj09rkrgn9888g7iim5p8611qyhdgky"; sha256 = "0l1nk4dgmlv8vl1d993vnyw3da0kzg4gq8c2zd8sd224f2rz6f35";
# date = 2018-11-30T22:13:02+01:00; # date = 2019-12-20T01:20:07+01:00;
}) {}); }) {});
ghc-exactprint = dontCheck (self.callCabal2nix "ghc-exactprint" ghc-exactprint = dontCheck (self.callCabal2nix "ghc-exactprint"
(pkgs.fetchFromGitHub { (pkgs.fetchFromGitHub {
owner = "alanz"; owner = "alanz";
repo = "ghc-exactprint"; repo = "ghc-exactprint";
rev = "281f65324fb1fcad8f5ceec06f5ea4c7d78cfb59"; rev = "91f54d7a7a1d8d2131c5e83d13dee6c9e8b57831";
sha256 = "1d6sjy5mw0jn09sgx7zn0w1gszn3mf6lzqsfv3li50fnvwv1gwzb"; sha256 = "15yf0ckcb6f706p39w448vgj0nrkd0rk71lvb1nd0ak46y0aqnhb";
# date = 2019-03-01T17:38:18+02:00; # date = 2019-08-28T20:44:28+02:00;
}) {}); }) {});
} // pkgs.lib.optionalAttrs withHoogle { } // pkgs.lib.optionalAttrs withHoogle {
ghc = super.ghc // { withPackages = super.ghc.withHoogle; }; ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
@ -100,7 +128,7 @@ in haskellPackages.developPackage {
modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: { modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: {
buildTools = (attrs.buildTools or []) ++ [ buildTools = (attrs.buildTools or []) ++ [
haskellPackages.cabal-install haskellPackages.cabal-install
haskellPackages.brittany # haskellPackages.brittany
]; ];
enableLibraryProfiling = doProfiling; enableLibraryProfiling = doProfiling;