diff options
author | Domen Kožar <domen@dev.si> | 2021-02-11 11:52:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 11:52:41 +0000 |
commit | 576f60806bede1c4ea6837e437c37dfcdfe4cf89 (patch) | |
tree | d9f94c06f30e8b203d690b43677d175e75a19915 /pkgs/development/compilers/elm | |
parent | d31965307652d50f8263c393e0351f3951e6737a (diff) | |
parent | bdf0239c3f83ee985901e930d87659731e02c8e2 (diff) |
Merge pull request #112457 from avh4/elm-format-0.8.5
elm-format: 0.8.4 -> 0.8.5
Diffstat (limited to 'pkgs/development/compilers/elm')
8 files changed, 153 insertions, 28 deletions
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index 5f7ca336ac966..333c8c2027059 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -7,7 +7,7 @@ let fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; }; - hsPkgs = haskell.packages.ghc883.override { + hsPkgs = haskell.packages.ghc8103.override { overrides = self: super: with haskell.lib; with lib; let elmPkgs = rec { elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: { @@ -41,7 +41,7 @@ let description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide"; homepage = "https://github.com/avh4/elm-format"; license = licenses.bsd3; - maintainers = with maintainers; [ turbomack ]; + maintainers = with maintainers; [ avh4 turbomack ]; })); elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: { @@ -79,6 +79,11 @@ let # Needed for elm-format indents = self.callPackage ./packages/indents.nix {}; + bimap = self.callPackage ./packages/bimap.nix {}; + avh4-lib = self.callPackage ./packages/avh4-lib.nix {}; + elm-format-lib = self.callPackage ./packages/elm-format-lib.nix {}; + elm-format-test-lib = self.callPackage ./packages/elm-format-test-lib.nix {}; + elm-format-markdown = self.callPackage ./packages/elm-format-markdown.nix {}; }; }; diff --git a/pkgs/development/compilers/elm/packages/avh4-lib.nix b/pkgs/development/compilers/elm/packages/avh4-lib.nix new file mode 100644 index 0000000000000..cd3df7d67a961 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/avh4-lib.nix @@ -0,0 +1,29 @@ +{ mkDerivation, ansi-terminal, ansi-wl-pprint, array, base, bimap +, binary, bytestring, containers, directory, fetchgit, filepath +, lib, mtl, process, relude, tasty, tasty-discover, tasty-hspec +, tasty-hunit, text +}: +mkDerivation { + pname = "avh4-lib"; + version = "0.0.0.1"; + src = fetchgit { + url = "https://github.com/avh4/elm-format"; + sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6"; + rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be"; + fetchSubmodules = true; + }; + postUnpack = "sourceRoot+=/avh4-lib; echo source root reset to $sourceRoot"; + libraryHaskellDepends = [ + ansi-terminal ansi-wl-pprint array base bimap binary bytestring + containers directory filepath mtl process relude text + ]; + testHaskellDepends = [ + ansi-terminal ansi-wl-pprint array base bimap binary bytestring + containers directory filepath mtl process relude tasty tasty-hspec + tasty-hunit text + ]; + testToolDepends = [ tasty-discover ]; + doHaddock = false; + description = "Common code for haskell projects"; + license = lib.licenses.bsd3; +} diff --git a/pkgs/development/compilers/elm/packages/bimap.nix b/pkgs/development/compilers/elm/packages/bimap.nix new file mode 100644 index 0000000000000..41412d1639c7f --- /dev/null +++ b/pkgs/development/compilers/elm/packages/bimap.nix @@ -0,0 +1,15 @@ +{ mkDerivation, base, containers, exceptions, lib, QuickCheck +, template-haskell +}: +mkDerivation { + pname = "bimap"; + version = "0.3.3"; + sha256 = "73829355c7bcbd3eedba22a382a04a3ab641702b00828790ec082ec2db3a8ad1"; + libraryHaskellDepends = [ base containers exceptions ]; + testHaskellDepends = [ + base containers exceptions QuickCheck template-haskell + ]; + homepage = "https://github.com/joelwilliamson/bimap"; + description = "Bidirectional mapping between two key types"; + license = lib.licenses.bsd3; +} diff --git a/pkgs/development/compilers/elm/packages/elm-format-lib.nix b/pkgs/development/compilers/elm/packages/elm-format-lib.nix new file mode 100644 index 0000000000000..7beb52e8006ed --- /dev/null +++ b/pkgs/development/compilers/elm/packages/elm-format-lib.nix @@ -0,0 +1,33 @@ +{ mkDerivation, ansi-terminal, ansi-wl-pprint, array, avh4-lib +, base, bimap, binary, bytestring, containers, directory +, elm-format-markdown, elm-format-test-lib, fetchgit, filepath +, indents, json, lib, mtl, optparse-applicative, parsec, process +, relude, split, tasty, tasty-discover, tasty-hspec, tasty-hunit +, text +}: +mkDerivation { + pname = "elm-format-lib"; + version = "0.0.0.1"; + src = fetchgit { + url = "https://github.com/avh4/elm-format"; + sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6"; + rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be"; + fetchSubmodules = true; + }; + postUnpack = "sourceRoot+=/elm-format-lib; echo source root reset to $sourceRoot"; + libraryHaskellDepends = [ + ansi-terminal ansi-wl-pprint array avh4-lib base bimap binary + bytestring containers directory elm-format-markdown filepath + indents json mtl optparse-applicative parsec process relude text + ]; + testHaskellDepends = [ + ansi-terminal ansi-wl-pprint array avh4-lib base bimap binary + bytestring containers directory elm-format-markdown + elm-format-test-lib filepath indents json mtl optparse-applicative + parsec process relude split tasty tasty-hspec tasty-hunit text + ]; + testToolDepends = [ tasty-discover ]; + doHaddock = false; + description = "Common code used by elm-format and elm-refactor"; + license = lib.licenses.bsd3; +} diff --git a/pkgs/development/compilers/elm/packages/elm-format-markdown.nix b/pkgs/development/compilers/elm/packages/elm-format-markdown.nix new file mode 100644 index 0000000000000..ae3b40347dbb9 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/elm-format-markdown.nix @@ -0,0 +1,16 @@ +{ mkDerivation, base, containers, fetchgit, lib, mtl, text }: +mkDerivation { + pname = "elm-format-markdown"; + version = "0.0.0.1"; + src = fetchgit { + url = "https://github.com/avh4/elm-format"; + sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6"; + rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be"; + fetchSubmodules = true; + }; + postUnpack = "sourceRoot+=/elm-format-markdown; echo source root reset to $sourceRoot"; + libraryHaskellDepends = [ base containers mtl text ]; + doHaddock = false; + description = "Markdown parsing for Elm documentation comments"; + license = lib.licenses.bsd3; +} diff --git a/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix b/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix new file mode 100644 index 0000000000000..729c2d678fce6 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/elm-format-test-lib.nix @@ -0,0 +1,27 @@ +{ mkDerivation, avh4-lib, base, containers, fetchgit, filepath +, hspec-core, hspec-golden, lib, mtl, split, tasty, tasty-discover +, tasty-hspec, tasty-hunit, text +}: +mkDerivation { + pname = "elm-format-test-lib"; + version = "0.0.0.1"; + src = fetchgit { + url = "https://github.com/avh4/elm-format"; + sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6"; + rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be"; + fetchSubmodules = true; + }; + postUnpack = "sourceRoot+=/elm-format-test-lib; echo source root reset to $sourceRoot"; + libraryHaskellDepends = [ + avh4-lib base containers filepath hspec-core hspec-golden mtl split + tasty tasty-hspec tasty-hunit text + ]; + testHaskellDepends = [ + avh4-lib base containers filepath hspec-core hspec-golden mtl split + tasty tasty-hspec tasty-hunit text + ]; + testToolDepends = [ tasty-discover ]; + doHaddock = false; + description = "Test helpers used by elm-format-tests and elm-refactor-tests"; + license = lib.licenses.bsd3; +} diff --git a/pkgs/development/compilers/elm/packages/elm-format.nix b/pkgs/development/compilers/elm/packages/elm-format.nix index b2f655d4f1c57..6b583a6edde2f 100644 --- a/pkgs/development/compilers/elm/packages/elm-format.nix +++ b/pkgs/development/compilers/elm/packages/elm-format.nix @@ -1,40 +1,40 @@ -{ mkDerivation, fetchgit, ansi-terminal, ansi-wl-pprint, array, base, binary -, bytestring, cmark, containers, directory, filepath, free, HUnit -, indents, json, mtl, optparse-applicative, parsec, process -, QuickCheck, quickcheck-io, split, lib, tasty, tasty-golden -, tasty-hunit, tasty-quickcheck, text +{ mkDerivation, ansi-wl-pprint, avh4-lib, base, bimap, cmark +, containers, elm-format-lib, elm-format-test-lib, fetchgit, json +, lib, mtl, optparse-applicative, parsec, QuickCheck, quickcheck-io +, relude, tasty, tasty-hspec, tasty-hunit, tasty-quickcheck, text }: -mkDerivation { +mkDerivation rec { pname = "elm-format"; - version = "0.8.4"; + version = "0.8.5"; src = fetchgit { url = "https://github.com/avh4/elm-format"; - sha256 = "0cxlhhdjx4h9g03z83pxv91qrysbi0ab92rl52jb0yvkaix989ai"; - rev = "5bd4fbe591fe8b456160c180cb875ef60bc57890"; + sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6"; + rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be"; + fetchSubmodules = true; }; - postPatch = '' - mkdir -p ./generated - cat <<EOHS > ./generated/Build_elm_format.hs - module Build_elm_format where - - gitDescribe :: String - gitDescribe = "0.8.4" - EOHS - ''; isLibrary = false; isExecutable = true; - libraryHaskellDepends = [ - ansi-terminal ansi-wl-pprint array base binary bytestring - containers directory filepath free indents json mtl - optparse-applicative parsec process split text + executableHaskellDepends = [ + ansi-wl-pprint avh4-lib base containers elm-format-lib json + optparse-applicative relude text ]; - executableHaskellDepends = [ base ]; testHaskellDepends = [ - base cmark containers HUnit mtl parsec QuickCheck quickcheck-io - split tasty tasty-golden tasty-hunit tasty-quickcheck text + ansi-wl-pprint avh4-lib base bimap cmark containers elm-format-lib + elm-format-test-lib json mtl optparse-applicative parsec 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; + postPatch = '' + mkdir -p ./generated + cat <<EOHS > ./generated/Build_elm_format.hs + module Build_elm_format where + + gitDescribe :: String + gitDescribe = "${version}" + EOHS + ''; } diff --git a/pkgs/development/compilers/elm/packages/indents.nix b/pkgs/development/compilers/elm/packages/indents.nix index d196e8d0fbf64..85e765db3e50b 100644 --- a/pkgs/development/compilers/elm/packages/indents.nix +++ b/pkgs/development/compilers/elm/packages/indents.nix @@ -1,4 +1,4 @@ -{ mkDerivation, base, concatenative, mtl, parsec, lib }: +{ mkDerivation, base, concatenative, lib, mtl, parsec }: mkDerivation { pname = "indents"; version = "0.3.3"; |