about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix
blob: c4448f246425401018bdb8ac950a089e5bb95d96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ mkDerivation, aeson, ansi-wl-pprint, avh4-lib, base, bytestring
, elm-format-lib, elm-format-test-lib, fetchgit, hspec, lib
, optparse-applicative, QuickCheck, quickcheck-io, relude, tasty
, tasty-hspec, tasty-hunit, tasty-quickcheck, text
}:
mkDerivation rec {
  pname = "elm-format";
  version = "0.8.7";
  src = fetchgit {
    url = "https://github.com/avh4/elm-format";
    sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
    rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
    fetchSubmodules = true;
  };
  isLibrary = false;
  isExecutable = true;
  executableHaskellDepends = [
    aeson ansi-wl-pprint avh4-lib base bytestring elm-format-lib
    optparse-applicative relude text
  ];
  testHaskellDepends = [
    aeson ansi-wl-pprint avh4-lib base bytestring elm-format-lib
    elm-format-test-lib hspec optparse-applicative QuickCheck
    quickcheck-io relude tasty tasty-hspec tasty-hunit tasty-quickcheck
    text
  ];
  doHaddock = false;
  homepage = "https://elm-lang.org";
  description = "A source code formatter for Elm";
  license = lib.licenses.bsd3;
  mainProgram = "elm-format";
  postPatch = ''
    mkdir -p ./generated
    cat <<EOHS > ./generated/Build_elm_format.hs
    module Build_elm_format where

    gitDescribe :: String
    gitDescribe = "${version}"
    EOHS
  '';
}