replace elm-live with elm-go

This commit is contained in:
Azizul Karim 2025-01-31 21:45:50 +06:00
parent 3445273d1c
commit 158174d756
No known key found for this signature in database
GPG key ID: EC7B9BE87276BA4B
2 changed files with 25 additions and 2 deletions

View file

@ -99,6 +99,29 @@
}
)
) { };
elm-go = prev.callPackage (
{
lib,
buildNpmPackage,
elmPackages,
}:
buildNpmPackage {
name = "elm-go";
version = "5.0.20";
src = pkgs.fetchFromGitHub {
owner = "lucamug";
repo = "elm-go";
rev = "9a7bd8c980a03b026128fcd626b9395b4e2cb1e0";
sha256 = "sha256-B5Cngv8EGOY79u9aZeixA3EBt8rIc6bkYA4zoqycpk8=";
};
npmDepsHash = "sha256-0LfLpUbav8cVoZ9/Cjb7Mr8jdo1/KjVcjR4lcYB3AzY=";
dontNpmBuild = true;
makeWrapperArgs = [
"--suffix PATH : ${lib.makeBinPath [ elmPackages.elm ]}"
];
}
) { };
})
];
};
@ -114,7 +137,7 @@
mkShell {
inputsFrom = [ example-spa-elm-app ];
buildInputs = [
elmPackages.elm-live
elm-go
];
};
}

View file

@ -21,7 +21,7 @@ endif
serve:
ifeq ($(DEBUG),1)
elm-live src/Main.elm --port=8000 --dir=../public --start-page=index.html -- --output=../public/elm.min.js
elm-go src/Main.elm --port=8000 --dir=../public --start-page=index.html -- --output=../public/elm.min.js
else ifeq ($(RELEASE),1)
$(error Cannot use serve target with RELEASE=1)
endif