nixpkgs/pkgs/applications/misc/mainsail/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

2023-03-08 12:45:25 +00:00
{ lib
, buildNpmPackage
, fetchFromGitHub
2023-03-08 12:45:25 +00:00
}:
buildNpmPackage rec {
2023-03-08 12:45:25 +00:00
pname = "mainsail";
2024-05-06 05:36:07 +00:00
version = "2.11.2";
2023-03-08 12:45:25 +00:00
src = fetchFromGitHub {
owner = "mainsail-crew";
repo = "mainsail";
rev = "v${version}";
hash = "sha256-N0tm36YMRRrkyuIwzcYbDo1DHesAnJ2s2g0KCms3h5I=";
2023-03-08 12:45:25 +00:00
};
npmDepsHash = "sha256-z6Fo0XAds/F0Ig+nUE3O16gmH0EVcpML3K8cdKhkJzg=";
# 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-03-08 12:45:25 +00:00
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r ./dist $out/share/mainsail
2023-03-08 12:45:25 +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;
maintainers = with maintainers; [ shhht lovesegfault wulfsta ];
2023-03-08 12:45:25 +00:00
};
}