diff options
author | r-vdp <ramses@well-founded.dev> | 2023-05-21 21:56:48 +0200 |
---|---|---|
committer | r-vdp <ramses@well-founded.dev> | 2023-05-22 00:26:25 +0200 |
commit | 714c4d35fa509d168f2df634fe1d4711f51b2e62 (patch) | |
tree | c0c8d5a91b3facfcdaa27415b0259ba14eebf48c /pkgs/development/compilers/elm | |
parent | 5ff5d1b571e2db7b6a038492e362a63ab75d77b9 (diff) |
elmPackages: nodejs_14 -> nodejs_18.
Follow-up to #230543, we were still using nodejs_14 for some packages.
I also turned the node dependency into an input, so that it can be
overriden, which is handy for local testing.
Diffstat (limited to 'pkgs/development/compilers/elm')
-rw-r--r-- | pkgs/development/compilers/elm/default.nix | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index 6a720026b3ce..55b55b931aab 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -1,10 +1,10 @@ -{ pkgs, lib, makeWrapper }: +{ pkgs +, lib +, makeWrapper +, nodejs ? pkgs.nodejs_18 +}: let - - # To control nodejs version we pass down - nodejs = pkgs.nodejs_18; - fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { }; # Haskell packages that require ghc 8.10 @@ -115,8 +115,7 @@ let }; nodePkgs = pkgs.callPackage ./packages/node-composition.nix { - inherit pkgs; - nodejs = pkgs.nodejs_14; + inherit pkgs nodejs; inherit (pkgs.stdenv.hostPlatform) system; }; @@ -152,7 +151,8 @@ in lib.makeScope pkgs.newScope (self: with self; { }; }; } // (hs810Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (with elmLib; with (hs810Pkgs self).elmPkgs; { - elm-verify-examples = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // { + elm-verify-examples = let + patched = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // { meta = with lib; nodePkgs.elm-verify-examples.meta // { description = "Verify examples in your docs"; homepage = "https://github.com/stoeffel/elm-verify-examples"; @@ -160,6 +160,14 @@ in lib.makeScope pkgs.newScope (self: with self; { maintainers = [ maintainers.turbomack ]; }; }; + in patched.override (old: { + preRebuild = (old.preRebuild or "") + '' + # This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done + # in case of just this package + # TODO: investigate, same as for elm-coverage below + sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json + ''; + }); elm-coverage = let patched = patchNpmElm (patchBinwrap [elmi-to-json] nodePkgs.elm-coverage); |