diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index 1d61b833149..ceebfbde886 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -42,6 +42,7 @@ let doCheck = false; jailbreak = true; })); + elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: { prePatch = '' substituteInPlace package.yaml --replace "- -Werror" "" @@ -50,6 +51,23 @@ let jailbreak = true; })); + elm-instrument = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-instrument.nix {}) (drv: { + patches = [( + # GHC 8.8.1 and Cabal >= 1.25.0 support + # https://github.com/zwilias/elm-instrument/pull/3 + fetchpatch { + url = "https://github.com/turboMaCk/elm-instrument/commit/4272db2aea742c8b54509e536fa4f35d04f95da5.patch"; + sha256 = "1d1lc43lp3x5jfhlyb1b7na7nj1g1i1vc1np26pcisg9c2s7gjz6"; + } + )]; + prePatch = '' + sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place + ''; + jailbreak = true; + # Tests are failing because of missing instances for Eq and Show type classes + doCheck = false; + })); + inherit fetchElmDeps; elmVersion = elmPkgs.elm.version; }; diff --git a/pkgs/development/compilers/elm/packages/elm-instrument.nix b/pkgs/development/compilers/elm/packages/elm-instrument.nix new file mode 100644 index 00000000000..bd769016227 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/elm-instrument.nix @@ -0,0 +1,34 @@ +{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary +, bytestring, Cabal, cmark, containers, directory, elm-format +, fetchgit, filepath, free, HUnit, indents, json, mtl +, optparse-applicative, parsec, process, QuickCheck, quickcheck-io +, split, stdenv, tasty, tasty-golden, tasty-hunit, tasty-quickcheck +, text, elm +}: +mkDerivation { + pname = "elm-instrument"; + version = "0.0.7"; + src = fetchgit { + url = "https://github.com/zwilias/elm-instrument.git"; + sha256 = "14yfzwsyvgc6rzn19sdmwk2mc1vma9hcljnmjnmlig8mp0271v56"; + rev = "31b527e405a6afdb25bb87ad7bd14f979e65cff7"; + fetchSubmodules = true; + }; + isLibrary = true; + isExecutable = true; + setupHaskellDepends = [ base Cabal directory filepath process ]; + libraryHaskellDepends = [ + ansi-terminal ansi-wl-pprint base binary bytestring containers + directory filepath free indents json mtl optparse-applicative + parsec process split text + ]; + executableHaskellDepends = [ base ]; + testHaskellDepends = [ + base cmark containers elm-format HUnit mtl parsec QuickCheck + quickcheck-io split tasty tasty-golden tasty-hunit tasty-quickcheck + text + ]; + homepage = "http://elm-lang.org"; + description = "Instrumentation library for Elm"; + license = stdenv.lib.licenses.bsd3; +}