mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-11 06:55:40 +03:00
Adds mkCabalProjectPkgsSet
This commit is contained in:
parent
3584345a9a
commit
e122281e02
17
default.nix
17
default.nix
@ -82,6 +82,23 @@ let
|
||||
modules = [ ghcHackagePatches.${compiler.nix-name} ] ++ modules;
|
||||
};
|
||||
|
||||
# Create a Haskell package set based on a Cabal configuration.
|
||||
mkCabalProjectPkgSet =
|
||||
{ plan-pkgs # Path to the output of plan-to-nix
|
||||
, pkg-def-overlays ? []
|
||||
, modules ? []
|
||||
}@args:
|
||||
|
||||
let
|
||||
pkg-def = plan-pkgs.pkgs;
|
||||
# The compiler referenced in the stack config
|
||||
compiler = (plan-pkgs.overlay hackage).compiler or (pkg-def hackage).compiler;
|
||||
in self.mkPkgSet {
|
||||
inherit pkg-def;
|
||||
pkg-def-overlays = [ plan-pkgs.overlay ] ++ pkg-def-overlays;
|
||||
modules = [ ghcHackagePatches.${compiler.nix-name} ] ++ modules;
|
||||
};
|
||||
|
||||
# Programs for generating Nix expressions from Cabal and Stack
|
||||
# files.
|
||||
nix-tools = self.callPackage ./nix-tools {
|
||||
|
Loading…
Reference in New Issue
Block a user