complete-computing-environment/drawingbot-v3.org

2.4 KiB

DrawingBot

DrawingBotV3 is a software for converting images to line drawings for Plotters / Drawing Machines / 3D printers. It also serves as an application for visual artists to create stylised line drawings from images / video

DrawingBot V3 on NixOS

DrawingBot uses JavaFX and is distributed as a JAR, rpm, deb, windows… The Premium version is just shoved in to my Syncthing directory and is provided in an override in rixpkgs. It should work just fine with the free/libre version which is lib.license.gplv3, but I use the proprietary version.

{ pkgs,
  name ? "drawingbotv3-free",
  ... }:

with pkgs;
stdenv.mkDerivation rec {
  inherit name;
  version = "1.5.0-beta";

  src = fetchurl {
    url = "https://github.com/SonarSonic/DrawingBotV3/releases/download/v${version}-free/DrawingBotV3-Free-${version}-all.jar";
    sha256 = lib.fakeSha256;
  };
  nativeBuildInputs = [ wrapGAppsHook gtk3 ];

  dontUnpack = true;

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/java/
    cp $src $out/share/java/${name}-${version}.jar

    makeWrapper ${jre}/bin/java $out/bin/${name} \
      ''${gappsWrapperArgs[@]} \
      --add-flags "-jar $out/share/java/${name}-${version}.jar"

    runHook postInstall
  '';

  desktopItems = [
    (makeDesktopItem {
      inherit name;
      exec = name;
      comment = "Software for converting images to line drawings for Plotters / Drawing Machines / 3D printers";
      desktopName = "DrawingBot V3";
      categories = [ "Graphics" ];
    })
  ];

  meta = {
    homepage = "https://github.com/SonarSonic/DrawingBotV3";
    description = "DrawingBotV3 is a software for converting images to line drawings";
    license = lib.licenses.gplv3;
    maintainers = with lib.maintainers; [ rrix ];
  };
}
{ pkgs, ... }:

{ 
  home.packages =  [ pkgs.drawingbot-premium ];
}