2021-06-17 22:53:21 +02:00
|
|
|
{ lib, stdenv, fetchzip, makeWrapper, wrapGAppsHook, glib, jdk11 }:
|
2021-05-13 08:56:01 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "VisiCut";
|
|
|
|
version = "1.9-94-g8b1c96b7";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://download.visicut.org/files/master/All/${pname}-${version}.zip";
|
|
|
|
sha256 = "12xkysh66vcv17dffn9ybqk85lzxy4rqswxv4jwr0b1fwajfvd96";
|
|
|
|
};
|
|
|
|
|
2021-06-17 22:53:21 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
|
|
|
buildInputs = [ glib jdk11 ];
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
2021-05-13 08:56:01 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-06-17 22:53:21 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2021-05-13 08:56:01 +02:00
|
|
|
rm ${pname}.{exe,Linux,MacOS}
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r . $out/share/${pname}
|
2021-06-17 22:53:21 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Needs to be run in fixupPhase, since gappsWrapperArgs are not fully
|
|
|
|
# populated in installPhase yet.
|
|
|
|
postFixup = ''
|
2021-05-13 08:56:01 +02:00
|
|
|
makeWrapper \
|
|
|
|
${jdk11}/bin/java \
|
|
|
|
$out/bin/${pname} \
|
|
|
|
--add-flags "-Xms256m -Xmx2048m -jar $out/share/${pname}/Visicut.jar" \
|
2021-06-17 22:53:21 +02:00
|
|
|
"''${gappsWrapperArgs[@]}"
|
2021-05-13 08:56:01 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A userfriendly tool to prepare, save and send Jobs to Lasercutters";
|
|
|
|
homepage = "https://visicut.org/";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = with maintainers; [ sbruder ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|