mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib
|
|
, buildNpmPackage
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "mainsail";
|
|
version = "2.12.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mainsail-crew";
|
|
repo = "mainsail";
|
|
rev = "v${version}";
|
|
hash = "sha256-ZRs+KhHNQIGXy/3MUNM5OUuWSntfjYsW3d0OOvuvdAQ=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-du1X58wUTelgJO/0JYwxfHjjNpu1e4M1GDvx6tgz8Zw=";
|
|
|
|
# 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
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/share
|
|
cp -r ./dist $out/share/mainsail
|
|
|
|
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 ];
|
|
};
|
|
}
|