2023-05-21 21:56:48 +02:00
|
|
|
{ pkgs
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, nodejs ? pkgs.nodejs_18
|
|
|
|
}:
|
2022-02-14 21:53:01 +01:00
|
|
|
|
2015-08-13 13:50:59 +02:00
|
|
|
let
|
2024-03-28 16:57:47 +01:00
|
|
|
fetchElmDeps = pkgs.callPackage ./lib/fetchElmDeps.nix { };
|
2022-02-14 21:53:01 +01:00
|
|
|
|
2024-01-06 14:21:12 +01:00
|
|
|
# Haskell packages that require ghc 9.6
|
2024-03-28 16:57:47 +01:00
|
|
|
hs96Pkgs = import ./packages/ghc9_6 { inherit pkgs lib makeWrapper nodejs fetchElmDeps; };
|
2023-12-28 14:14:21 +01:00
|
|
|
|
2024-01-06 14:21:12 +01:00
|
|
|
# Haskell packages that require ghc 8.10
|
2024-03-28 16:57:47 +01:00
|
|
|
hs810Pkgs = import ./packages/ghc8_10 { inherit pkgs lib; };
|
2023-03-01 22:38:02 +01:00
|
|
|
|
|
|
|
# Haskell packages that require ghc 9.2
|
2024-03-28 16:57:47 +01:00
|
|
|
hs92Pkgs = import ./packages/ghc9_2 { inherit pkgs lib; };
|
2020-04-15 21:29:52 +02:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
# Patched, originally npm-downloaded, packages
|
|
|
|
patchedNodePkgs = import ./packages/node { inherit pkgs lib nodejs makeWrapper; };
|
2021-12-08 12:08:12 +01:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
assembleScope = self: basics:
|
|
|
|
(hs96Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (hs810Pkgs self).elmPkgs // (patchedNodePkgs self) // basics;
|
|
|
|
in
|
|
|
|
lib.makeScope pkgs.newScope
|
|
|
|
(self: assembleScope self
|
|
|
|
(with self; {
|
|
|
|
inherit fetchElmDeps nodejs;
|
2022-02-14 21:53:01 +01:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
/* Node/NPM based dependencies can be upgraded using script `packages/generate-node-packages.sh`.
|
2020-11-29 16:23:10 +01:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
* Packages which rely on `bin-wrap` will fail by default
|
|
|
|
and can be patched using `patchBinwrap` function defined in `packages/lib.nix`.
|
2022-02-14 21:53:01 +01:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
* Packages which depend on npm installation of elm can be patched using
|
|
|
|
`patchNpmElm` function also defined in `packages/lib.nix`.
|
|
|
|
*/
|
|
|
|
elmLib =
|
2024-01-07 04:20:30 +01:00
|
|
|
let
|
2024-03-28 16:57:47 +01:00
|
|
|
hsElmPkgs = (hs810Pkgs self) // (hs96Pkgs self);
|
2024-01-07 04:20:30 +01:00
|
|
|
in
|
2024-03-28 16:57:47 +01:00
|
|
|
import ./lib {
|
|
|
|
inherit lib;
|
|
|
|
inherit (pkgs) writeScriptBin stdenv;
|
|
|
|
inherit (self) elm;
|
|
|
|
};
|
|
|
|
|
|
|
|
elm-json = callPackage ./packages/elm-json { };
|
2023-11-05 11:54:48 +01:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
elm-test-rs = callPackage ./packages/elm-test-rs { };
|
2020-08-27 20:58:50 +02:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
elm-test = callPackage ./packages/elm-test { };
|
2022-11-12 12:35:30 +01:00
|
|
|
|
2024-03-28 16:57:47 +01:00
|
|
|
lamdera = callPackage ./packages/lamdera { };
|
2022-02-14 21:53:01 +01:00
|
|
|
})
|
|
|
|
)
|