12 pythonEnv = python3.withPackages (ps: with ps; [
20 udevRule = writeText "k40-whisperer.rules" ''
21 SUBSYSTEM=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5512", ENV{DEVTYPE}=="usb_device", MODE="0664", GROUP="${udevGroup}"
24 in stdenv.mkDerivation rec {
25 pname = "k40-whisperer";
29 url = "https://www.scorchworks.com/K40whisperer/K40_Whisperer-${version}_src.zip";
31 sha256 = "sha256-Pc6iqBQUoI0dsrf+2dA1ZbxX+4Eks/lVgMGC4SR+oFI=";
34 nativeBuildInputs = [ makeWrapper ];
37 substituteInPlace svg_reader.py \
38 --replace '"/usr/bin/inkscape"' '"${inkscape}/bin/inkscape"'
48 mkdir -p $out/lib/udev/rules.d
50 ln -s ${udevRule} $out/lib/udev/rules.d/97-k40-whisperer.rules
52 makeWrapper '${pythonEnv.interpreter}' $out/bin/k40-whisperer \
53 --add-flags $out/k40_whisperer.py \
54 --prefix PYTHONPATH : $out
59 Control software for the stock K40 Laser controller
61 mainProgram = "k40-whisperer";
63 K40 Whisperer is an alternative to the the Laser Draw (LaserDRW) program that comes with the cheap Chinese laser cutters available on E-Bay and Amazon.
64 K40 Whisperer reads SVG and DXF files, interprets the data and sends commands to the K40 controller to move the laser head and control the laser accordingly.
65 K40 Whisperer does not require a USB key (dongle) to function.
67 homepage = "https://www.scorchworks.com/K40whisperer/k40whisperer.html";
68 downloadPage = "https://www.scorchworks.com/K40whisperer/k40whisperer.html#download";
69 license = licenses.gpl3;
70 maintainers = with maintainers; [ fooker ];
71 platforms = platforms.all;