elmPackages.elm-watch: init at 1.2.6 (#515825)

This commit is contained in:
Marek Fajkus
2026-09-27 09:14:34 +00:00
committed by GitHub
3 changed files with 65 additions and 0 deletions

View File

@@ -20101,6 +20101,12 @@
githubId = 52401682;
name = "myul";
};
Myxogastria0808 = {
email = "r.rstudio.c@gmail.com";
github = "Myxogastria0808";
githubId = 78744619;
name = "Yuki Osada";
};
myypo = {
email = "nikirsmcgl@gmail.com";
github = "myypo";

View File

@@ -61,6 +61,8 @@ lib.makeScope pkgs.newScope (
elm-verify-examples = callPackage ./packages/elm-verify-examples { };
elm-watch = callPackage ./packages/elm-watch { };
elm-xref = callPackage ./packages/elm-xref { };
lamdera = callPackage ./packages/lamdera { };

View File

@@ -0,0 +1,57 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
makeBinaryWrapper,
nodejs,
nix-update-script,
}:
buildNpmPackage (finalAttrs: {
pname = "elm-watch";
version = "1.2.6";
inherit nodejs;
src = fetchFromGitHub {
owner = "lydell";
repo = "elm-watch";
tag = "v${finalAttrs.version}";
hash = "sha256-qfKXbONIqlfv9joAMhAxGMinfHaZvKEz2FL6YFl7OSI=";
fetchSubmodules = true;
};
npmDepsHash = "sha256-ae4bUl5/GGAtYR7cc8om3C4/XjCUe8v3sWpIhIXBGV8=";
npmFlags = [ "--ignore-scripts" ];
dontNpmInstall = true;
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
runHook preInstall
local moduleDir="$out/lib/node_modules/elm-watch"
mkdir -p "$moduleDir"
npm prune --omit=dev --ignore-scripts --no-save
cp -r build/. "$moduleDir/"
cp -r node_modules "$moduleDir/"
mkdir -p "$out/bin"
makeWrapper ${nodejs}/bin/node "$out/bin/elm-watch" \
--add-flags "$moduleDir/index.js"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "`elm make` in watch mode. Fast and reliable";
homepage = "https://github.com/lydell/elm-watch";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Myxogastria0808 ];
mainProgram = "elm-watch";
};
})