nixpkgs/pkgs/tools/misc/ugs/default.nix

53 lines
1.3 KiB
Nix
Raw Normal View History

2023-06-13 17:40:53 +00:00
{ stdenv
, lib
, copyDesktopItems
, makeDesktopItem
, makeWrapper
, jre
, fetchzip
}:
let
desktopItem = makeDesktopItem {
name = "ugs";
exec = "ugs";
comment = "A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.";
desktopName = "Universal-G-Code-Sender";
categories = [ "Game" ];
};
in
stdenv.mkDerivation rec {
pname = "ugs";
2023-06-23 18:41:32 +00:00
version = "2.0.18";
2023-06-13 17:40:53 +00:00
src = fetchzip {
url = "https://github.com/winder/Universal-G-Code-Sender/releases/download/v${version}/UniversalGcodeSender.zip";
2023-06-23 18:41:32 +00:00
hash = "sha256-NaEDG3dmpPRwfVvwYJQXqpCcAkRPeQ1EcKoa0xKeDFA=";
2023-06-13 17:40:53 +00:00
};
dontUnpack = true;
nativeBuildInputs = [ copyDesktopItems makeWrapper ];
installPhase = ''
runHook preInstall
makeWrapper ${jre}/bin/java $out/bin/ugs \
--prefix PATH : ${lib.makeBinPath [ jre ]} \
--add-flags "-jar ${src}/UniversalGcodeSender.jar"
runHook postInstall
'';
desktopItems = [ desktopItem ];
meta = with lib; {
description = "A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.";
homepage = "https://github.com/winder/Universal-G-Code-Sender";
maintainers = with maintainers; [ matthewcroughan ];
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl3;
platforms = platforms.all;
};
}