Files
haskell.nix/overlays/default.nix
Hamish Mackenzie 6c7f9d0042 Use cabal 3.8 (#1641)
A bug was fixed in cabal 3.8 (https://github.com/haskell/cabal/issues/6771) that haskell.nix relied on for `pkg-config` in support.  To work around this we added a dummy `pkg-config` that `cabal configure` now uses when haskell.nix runs it `cabal configure` internally.  That returns version information for all the `pkg-config` packages in `lib/pkgconfig-nixpkgs-map.nix`.  This mapping has also been expanded based on the results of searching nixpkgs for `*.pc` files.

This update also includes workarounds for:

https://github.com/haskell/cabal/issues/8352
https://github.com/haskell/cabal/issues/8370
https://github.com/haskell/cabal/issues/8455
2022-09-13 12:00:04 +12:00

64 lines
1.7 KiB
Nix

{ sources, ...}@args:
let
overlays = {
wine = import ./wine.nix;
#ghcjs = import ./ghcjs-asterius-triple.nix;
#python = import ./python.nix;
haskell = import ./haskell.nix args;
bootstrap = import ./bootstrap.nix;
ghc = import ./ghc.nix;
ghc-packages = import ./ghc-packages.nix;
hydra = import ./hydra.nix args;
darwin = import ./darwin.nix;
windows = import ./windows.nix;
armv6l-linux = import ./armv6l-linux.nix;
musl = import ./musl.nix;
android = import ./android.nix;
tools = import ./tools.nix;
emscripten = import ./emscripten.nix;
nix-prefetch-git-minimal = import ./nix-prefetch-git-minimal.nix;
gobject-introspection = import ./gobject-introspection.nix;
hix = import ./hix.nix;
ghcjs = import ./ghcjs.nix;
cabalPkgConfig = import ./cabal-pkg-config.nix;
};
composeExtensions = f: g: final: prev:
let
fApplied = f final prev;
prev' = prev // fApplied;
in fApplied // g final prev';
ordered = with overlays; [
# Hide nixpkgs haskell and haskellPackages from the haskell-nix overlays.
# This should prevent us inadvertently depending on them.
(_: prev: {
haskell = { };
haskellPackages = { };
haskell-nix-prev = prev;
})
wine
haskell
bootstrap
ghc
ghc-packages
darwin
windows
armv6l-linux
musl
android
tools
emscripten
nix-prefetch-git-minimal
ghcjs
cabalPkgConfig
gobject-introspection
hix
hydra
# Restore nixpkgs haskell and haskellPackages
(_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; })
];
combined = builtins.foldl' composeExtensions (_: _: { }) ordered;
in overlays // { inherit combined; }