complete-computing-environment/drawingbot-v3.org

90 lines
2.9 KiB
Org Mode

:PROPERTIES:
:ID: 20221211T141924.762816
:ROAM_REFS: https://drawingbotv3.ollielansdell.co.uk/ https://github.com/SonarSonic/DrawingBotV3/
:END:
#+TITLE: DrawingBot
#+FILETAGS: :Software:CCE:
#+ARCOLOGY_KEY: cce/drawingbot
#+ARCOLOGY_ALLOW_CRAWL: t
#+begin_quote
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
#+end_quote
* DrawingBot V3 on NixOS
:PROPERTIES:
:ID: 20221228T201404.439331
:END:
#+ARROYO_HOME_MODULE: hm/drawingbot.nix
#+ARROYO_SYSTEM_ROLE: endpoint
#+AUTO_TANGLE: t
DrawingBot uses JavaFX and is distributed as a rpm, deb, or windows MSI... The Premium version is just shoved in to my [[id:cce/syncthing][Syncthing]] directory and is provided in an override in [[id:20221021T121120.541960][rixpkgs]]. It should work just fine with the free/libre version which is =lib.license.gplv3=, but I use the proprietary version and so this is actually untested. This package declaration takes a =deb= file and extracts it and repackages it.
#+begin_src nix :tangle ~/arroyo-nix/pkgs/drawingbot.nix
{ pkgs,
name ? "drawingbotv3-free",
... }:
with pkgs;
let
jdkWithJavaFX = jdk.override { enableJavaFX = true; };
in
stdenv.mkDerivation rec {
inherit name;
version = "1.6.9-beta";
src = fetchurl {
url = "https://github.com/SonarSonic/DrawingBotV3/releases/download/v${version}-free/DrawingBotV3-Free-${version}-linux.deb";
sha256 = lib.fakeSha256;
};
nativeBuildInputs = [ dpkg wrapGAppsHook autoPatchelfHook makeWrapper ];
buildInputs = [ xorg.libXtst alsa-lib opencv gtk2 ];
unpackPhase = "dpkg -x $src ./";
installPhase = ''
mkdir -p $out/lib/ $out/bin/ $out/share/icons
mv opt/drawingbotv3/bin/DrawingBotV3-Premium $out/bin/${name}
mv opt/drawingbotv3/lib/{app,libapplauncher.so} $out/lib/
# mv opt/drawingbotv3/lib/runtime $out/lib/
ln -s ${jdkWithJavaFX}/lib/openjdk $out/lib/runtime
mv opt/drawingbotv3/lib/DrawingBotV3-Premium.png $out/share/icons
ln -s $out/lib/app/DrawingBotV3-Premium.cfg $out/lib/app/..drawingbotv3-premium-wrapped-wrapped.cfg
wrapProgram "$out/bin/${name}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}"
'';
desktopItems = [
(makeDesktopItem {
name = "drawingbotv3-premium";
desktopName = "DrawingBotV3-Premium";
type = "Application";
exec = name;
icon = "DrawingBotV3-Premium.png";
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 ];
};
}
#+end_src
#+begin_src nix :tangle ~/arroyo-nix/hm/drawingbot.nix
{ pkgs, ... }:
{
home.packages = [ pkgs.drawingbot-premium ];
}
#+end_src