mirror of
https://github.com/ilyakooo0/haskell.nix.git
synced 2024-09-19 02:47:34 +03:00
Add appendModule function to projects. (#1240)
Allow re-eval of the project with an extra module (or module list).
This commit is contained in:
parent
c386fd6f82
commit
749a7dc068
@ -144,7 +144,7 @@ Then feeding its result into [mkStackPkgSet](#mkstackpkgset) passing also
|
||||
| `hsPkgs` | Attrset of [Haskell Packages](#haskell-package) | Buildable packages, created from `packages` |
|
||||
| `stack-nix` | | `projectNix` attribute of [`callStackToNix`](#callstacktonix) return value |
|
||||
| `shellFor` | Function | [`shellFor`](#shellfor) |
|
||||
| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
|
||||
| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
|
||||
| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
|
||||
|
||||
|
||||
@ -163,9 +163,10 @@ Then feeding its result into [mkCabalProjectPkgSet](#mkcabalprojectpkgset) passi
|
||||
| `plan-nix` | | `projectNix` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
|
||||
| `index-state` | | `index-state` attribute of [`callCabalProjectToNix`](#callcabalprojecttonix) return value |
|
||||
| `shellFor` | Function | [`shellFor`](#shellfor) |
|
||||
| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
|
||||
| `ghcWithHoogle` | Function | [`ghcWithHoogle`](#ghcwithhoogle) |
|
||||
| `ghcWithPackages` | Function | [`ghcWithPackages`](#ghcwithpackages) |
|
||||
| `projectCross` | Attrset | Like `pkgs.pkgsCross.<system>` from nixpkgs `p.projectCross.<system>` returns the project results for cross compilation (where system is a member of nixpkgs lib.systems.examples). So `p.projectCross.ghcjs.hsPkgs` is the same as `hsPkgs` but compiled with ghcjs |
|
||||
| `appendModule` | Function | Re-eval the project with an extra module (or module list). |
|
||||
|
||||
## project, cabalProject and stackProject
|
||||
|
||||
|
@ -577,6 +577,15 @@ final: prev: {
|
||||
rawProject.projectFunction pkgs.haskell-nix rawProject.projectModule
|
||||
) final.pkgsCross) // { recurseForDerivations = false; };
|
||||
|
||||
# re-eval this project with an extra module (or module list).
|
||||
appendModule = extraProjectModule: rawProject.projectFunction final.haskell-nix
|
||||
((if builtins.isList rawProject.projectModule
|
||||
then rawProject.projectModule
|
||||
else [rawProject.projectModule])
|
||||
++ (if builtins.isList extraProjectModule
|
||||
then extraProjectModule
|
||||
else [extraProjectModule]));
|
||||
|
||||
# Add support for passing in `crossPlatforms` argument.
|
||||
# crossPlatforms is an easy way to include the inputs for a basic
|
||||
# cross platform shell in a native shell.
|
||||
|
Loading…
Reference in New Issue
Block a user