I try to build base-4.11.1.0 (for diagrams-gtk) using cabal2nix and it fail with missing dependency invalid-cabal-flag-settings
$ cabal2nix cabal://base-4.11.1.0 > base.nix
generated base.nix
{ mkDerivation, ghc-prim, invalid-cabal-flag-settings, rts, stdenv
}:
mkDerivation {
pname = "base";
version = "4.11.1.0";
sha256 = "ef005c5d390756da26b31be37584a7990a671d8f65d1ea12443562e2b17b5e60";
libraryHaskellDepends = [
ghc-prim invalid-cabal-flag-settings rts
];
description = "Basic libraries";
license = stdenv.lib.licenses.bsd3;
}
looking on https://hackage.haskell.org/package/base-4.11.1.0 it have invalid-cabal-flag-settings listed as dependency, so I guess it not cabal2nix problem.
What is invalid-cabal-flag-settings dependency?
That dependency comes from this section:
-- sanity-check to ensure exactly one flag is set
if !((flag(integer-gmp) && !flag(integer-simple)) || (!flag(integer-gmp) && flag(integer-simple)))
build-depends: invalid-cabal-flag-settings<0
Looks like somehow both the integer-gmp and integer-simple flags are set?
1 Like
Do you know if this is the only working way for cabal to do this kind of check or it is just the legacy code that nobody don’t want to touch?
This hack cause the special-case problem on downstream tools like hackage and cabal2nix.
I don’t think it’s the only way, but I also don’t think it’s a legacy hack.
opened 12:20PM - 29 Mar 17 UTC
type: enhancement
Cabal: cmd/build
Some packages, specifically Lua, do not have a standard name in for pkg-config. … Lua 5.1 could be one of lua51, lua5.1, lua-5.1, or lua. It would be nice to have an "or" feature in pkgconfig-depends so you could specify that as something like:
pkgconfig-depends: lua51 || lua5.1 || lua-5.1 || (lua >= 5.1, lua < 5.2)
The last example in https://autotools.io/pkgconfig/pkg_check_modules.html shows how to accomplish this using autoconf.