2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
2024-06-20 14:57:18 +00:00
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
buildNpmPackage rec {
|
2023-05-24 13:37:59 +00:00
|
|
|
pname = "mainsail";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.12.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mainsail-crew";
|
|
|
|
repo = "mainsail";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ZRs+KhHNQIGXy/3MUNM5OUuWSntfjYsW3d0OOvuvdAQ=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
npmDepsHash = "sha256-du1X58wUTelgJO/0JYwxfHjjNpu1e4M1GDvx6tgz8Zw=";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
# Prevent Cypress binary download.
|
|
|
|
CYPRESS_INSTALL_BINARY = 0;
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# Make the build.zip target do nothing, since we will just copy these files later.
|
|
|
|
sed -e 's/"build.zip":.*,$/"build.zip": "",/g' -i package.json
|
|
|
|
'';
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r ./dist $out/share/mainsail
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Web interface for managing and controlling 3D printers with Klipper";
|
|
|
|
homepage = "https://docs.mainsail.xyz";
|
|
|
|
changelog = "https://github.com/mainsail-crew/mainsail/releases/tag/v${version}";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2024-06-20 14:57:18 +00:00
|
|
|
maintainers = with maintainers; [ shhht lovesegfault wulfsta ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
}
|