Closed Profpatsch closed 5 years ago
@Profpatsch: How were you able to build this? I ran into this same issue: https://github.com/haskell-nix/hnix/issues/493
I built against the last hnix version:
these = hlib.doJailbreak hsuper.these;
hnix = hlib.overrideCabal
(hsuper.hnix.override {
inherit (hself) these;
}) (old: {
src = fetchFromGitHub {
owner = "haskell-nix";
repo = "hnix";
rev = "e7efbb4f0624e86109acd818942c8cd18a7d9d3d";
sha256 = "0dismb9vl5fxynasc2kv5baqyzp6gpyybmd5p9g1hlcq3p7pfi24";
};
buildDepends = old.buildDepends or [] ++ (with hself; [
dependent-sum prettyprinter (hlib.doJailbreak ref-tf)
]);
});
dhall-nix = hlib.overrideCabal hsuper.dhall-nix (old: {
src = fetchFromGitHub {
owner = "Profpatsch";
repo = "dhall-nix";
rev = "update-to-dhall-0.21";
sha256 = "1kdsbnj681lf65dsdclcrzj4cab1hh0v22n2140386zvwmawyp6r";
};
broken = false;
});
So there might be a few changes we need to take care of once the newest hnix builds.
Here’s a patch that should get current hnix working: https://github.com/haskell-nix/hnix/pull/486
@Profpatsch: Sorry for the delay, but I had to make a few changes to get the Nix build working because hnix
is very picky about its dependencies. I put up a pull request against your branch: https://github.com/Profpatsch/dhall-nix/pull/1
If you merge that into your branch then I think CI should pass or be pretty close.
How did you generate the dependency files?
@Profpatsch: The old-fashioned way, using cabal2nix
. Any time there was a bounds failure I would either disable a test suite or update a package to the latest version
using
cabal2nix
How did you invoke cabal2nix
? I couldn’t figure it out trying more than five minutes.
$ cabal2nix cabal://${PACKAGE_NAME} > nix/${PACKAGE_NAME}.nix
I also made a change to automatically apply any overrides found in the ./nix
directory by using pkgs.haskell.lib.packagesFromDirectory
here:
Some things have changed in the dhall expression tree:
let
bindings now take a list of bindingsSome
andNone
were introducedAdditionally, dhall switched to an internal
Map
module instead ofHashMap.Strict.InsOrd
.I haven’t found any instructions on how the
dhall.nix
files are generated, I used my own overrides to work on this. Probably something withcabal2nix
, but its usage is not at all clear to me (and the errors it throws unhelpful).