mirror of
https://github.com/simplex-chat/haskell.nix.git
synced 2026-06-03 09:17:32 +00:00
Generalized version of the `cabalProject` and `stackProject` functions. Automatically selects the correct project type based on the `projectFileName` argument if provided or what files exist in the `src` directory if no `projectFileName` was specified. If it cannot be determined which it should use the following error message is given: ``` error: haskell-nix.project : both `stack.yaml` and `cabal.project` files exist set `projectFileName = "stack.yaml;"` or `projectFileName = "cabal.project";` ```
15 lines
286 B
Nix
15 lines
286 B
Nix
{ project', recurseIntoAttrs, testSrc }:
|
|
|
|
let
|
|
project = project' {
|
|
src = testSrc "stack-local-resolver";
|
|
};
|
|
packages = project.hsPkgs;
|
|
|
|
in recurseIntoAttrs {
|
|
ifdInputs = {
|
|
inherit (project) stack-nix;
|
|
};
|
|
inherit (packages.stack-local-resolver.components) library;
|
|
}
|