1{ pkgs, lib }:
2
3self:
4pkgs.haskell.packages.ghc98.override {
5 overrides =
6 self: super:
7 let
8 inherit (pkgs.haskell.lib.compose) justStaticExecutables overrideCabal;
9
10 elmPkgs = {
11 # Post-patch override taken from the upstream repository:
12 # https://github.com/avh4/elm-format/blob/e7e5da37716acbfb4954a88128b5cc72b2c911d9/package/nix/generate_derivation.sh
13 elm-format = justStaticExecutables (
14 overrideCabal (drv: {
15 postPatch = ''
16 mkdir -p ./generated
17 cat <<EOHS > ./generated/Build_elm_format.hs
18 module Build_elm_format where
19 gitDescribe :: String
20 gitDescribe = "${drv.version}"
21 EOHS
22 '';
23
24 homepage = "https://github.com/avh4/elm-format";
25 maintainers = with lib.maintainers; [
26 avh4
27 turbomack
28 ];
29 }) (self.callPackage ./elm-format/elm-format.nix { })
30 );
31 };
32 in
33 elmPkgs
34 // {
35 inherit elmPkgs;
36
37 # Needed for elm-format
38 avh4-lib = self.callPackage ./elm-format/avh4-lib.nix { };
39 elm-format-lib = self.callPackage ./elm-format/elm-format-lib.nix { };
40 elm-format-test-lib = self.callPackage ./elm-format/elm-format-test-lib.nix { };
41 elm-format-markdown = self.callPackage ./elm-format/elm-format-markdown.nix { };
42 };
43}