diff options
-rw-r--r-- | pkgs/development/compilers/elm/default.nix | 27 | ||||
-rw-r--r-- | pkgs/development/compilers/elm/packages/elm.nix | 11 | ||||
-rw-r--r-- | pkgs/development/compilers/elm/packages/elmi-to-json.nix | 5 |
3 files changed, 26 insertions, 17 deletions
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index 9ae727f93767..df969af940d8 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -7,8 +7,8 @@ let fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { }; - # Haskell packages that require ghc 8.10 - hs810Pkgs = self: pkgs.haskell.packages.ghc810.override { + # Haskell packages that require ghc 9.2 + hs96Pkgs = self: pkgs.haskell.packages.ghc92.override { overrides = self: super: with pkgs.haskell.lib.compose; with lib; let elmPkgs = rec { elm = overrideCabal (drv: { @@ -20,7 +20,6 @@ let registryDat = ./registry.dat; }; buildTools = drv.buildTools or [] ++ [ makeWrapper ]; - jailbreak = true; postInstall = '' wrapProgram $out/bin/elm \ --prefix PATH ':' ${lib.makeBinPath [ nodejs ]} @@ -32,6 +31,17 @@ let maintainers = with maintainers; [ domenkozar turbomack ]; }) (self.callPackage ./packages/elm.nix { }); + inherit fetchElmDeps; + elmVersion = elmPkgs.elm.version; + }; + in { + inherit elmPkgs; + }; + }; + + hs810Pkgs = self: pkgs.haskell.packages.ghc810.override { + overrides = self: super: with pkgs.haskell.lib.compose; with lib; + let elmPkgs = { elmi-to-json = justStaticExecutables (overrideCabal (drv: { prePatch = '' substituteInPlace package.yaml --replace "- -Werror" "" @@ -49,18 +59,15 @@ let 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; + jailbreak = true; description = "Instrument Elm code as a preprocessing step for elm-coverage"; homepage = "https://github.com/zwilias/elm-instrument"; license = licenses.bsd3; maintainers = [ maintainers.turbomack ]; }) (self.callPackage ./packages/elm-instrument.nix {})); - - inherit fetchElmDeps; - elmVersion = elmPkgs.elm.version; }; in elmPkgs // { inherit elmPkgs; @@ -82,7 +89,7 @@ let # Haskell packages that require ghc 9.2 hs92Pkgs = self: pkgs.haskell.packages.ghc92.override { overrides = self: super: with pkgs.haskell.lib.compose; with lib; - let elmPkgs = rec { + let elmPkgs = { /* The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo: `package/nix/build.sh` @@ -131,7 +138,7 @@ in lib.makeScope pkgs.newScope (self: with self; { `patchNpmElm` function also defined in `packages/lib.nix`. */ elmLib = let - hsElmPkgs = hs810Pkgs self; + hsElmPkgs = hs96Pkgs self; in import ./packages/lib.nix { inherit lib; inherit (pkgs) writeScriptBin stdenv; @@ -143,7 +150,7 @@ in lib.makeScope pkgs.newScope (self: with self; { elm-test-rs = callPackage ./packages/elm-test-rs.nix { }; elm-test = callPackage ./packages/elm-test.nix { }; -} // (hs810Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (with elmLib; with (hs810Pkgs self).elmPkgs; { +} // (hs96Pkgs self).elmPkgs // (hs810Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (with elmLib; with (hs810Pkgs self).elmPkgs; { elm-verify-examples = let patched = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // { meta = with lib; nodePkgs.elm-verify-examples.meta // { diff --git a/pkgs/development/compilers/elm/packages/elm.nix b/pkgs/development/compilers/elm/packages/elm.nix index a0c248af17bb..5b877e8a6a76 100644 --- a/pkgs/development/compilers/elm/packages/elm.nix +++ b/pkgs/development/compilers/elm/packages/elm.nix @@ -8,12 +8,15 @@ }: mkDerivation { pname = "elm"; - version = "0.19.1"; + # We're building binaries from commit that npm installer is using since + # November 1st release called 0.19.1-6. + # These binaries are built with newer ghc version and also support Aarch64 for Linux and Darwin. + # Upstream git tag for 0.19.1 is still pointing to original commit from 2019. + version = "0.19.1-6"; src = fetchgit { url = "https://github.com/elm/compiler"; - sha256 = "1rdg3xp3js9xadclk3cdypkscm5wahgsfmm4ldcw3xswzhw6ri8w"; - rev = "c9aefb6230f5e0bda03205ab0499f6e4af924495"; - fetchSubmodules = true; + rev = "2f6dd29258e880dbb7effd57a829a0470d8da48b"; + sha256 = "sha256-6PXucwc9nFN6TxxsSBuwEkKelThtJ6CLshjfsCmHMsE="; }; isLibrary = false; isExecutable = true; diff --git a/pkgs/development/compilers/elm/packages/elmi-to-json.nix b/pkgs/development/compilers/elm/packages/elmi-to-json.nix index 3362ce5cc7a7..f82f3e5179ac 100644 --- a/pkgs/development/compilers/elm/packages/elmi-to-json.nix +++ b/pkgs/development/compilers/elm/packages/elmi-to-json.nix @@ -8,9 +8,8 @@ mkDerivation { version = "1.3.0"; src = fetchgit { url = "https://github.com/stoeffel/elmi-to-json"; - sha256 = "11j56vcyhijkwi9hzggkwwmxlhzhgm67ab2m7kxkhcbbqgpasa8n"; - rev = "ae40d1aa1e3d6878f2af514e611d44890e7abc1e"; - fetchSubmodules = true; + rev = "bd18efb59d247439b362272b480e67a16a4e424e"; + sha256 = "sha256-9fScXRSyTkqzeXwh/Jjza6mnENCThlU6KI366CLFcgY="; }; isLibrary = true; isExecutable = true; |