10 python3.pkgs.buildPythonApplication rec {
14 src = fetchFromGitHub {
17 rev = "refs/tags/v${version}";
18 sha256 = "sha256-S5IrNWVoUp1w+P7DrKlOUOyY3Q16CHSct9ndZOB3UpU=";
22 # fix opening the extension on inkscape 1.2
23 # https://github.com/inkcut/inkcut/pull/340
25 url = "https://github.com/inkcut/inkcut/commit/d5d5d0ab3c588c576b668f4c7b07a10609ba2fd0.patch";
26 hash = "sha256-szfiOujuV7OOwYK/OU51m9FK6dzkbWds+h0cr5dGIg4=";
28 # fix loading a document from stdin (as used from the extension)
29 # https://github.com/inkcut/inkcut/issues/341
31 url = "https://github.com/inkcut/inkcut/commit/748ab4157f87afec37dadd715094e87d02c9c739.patch";
32 hash = "sha256-ZGiwZru2bUYu749YSz5vxmGwLTAoYIAsafcX6PmdbYo=";
35 # fix distutils deprecation error
36 # https://github.com/inkcut/inkcut/pull/343
38 url = "https://github.com/inkcut/inkcut/commit/9fb95204981bcc51401a1bc10caa02d1fae0d6cb.patch";
39 hash = "sha256-nriys7IWPGykZjVz+DIDsE9Tm40DewkHQlIUaxFwtzM=";
44 substituteInPlace inkcut/device/transports/printer/plugin.py \
45 --replace ", 'lpr', " ", '${cups}/bin/lpr', "
48 nativeBuildInputs = [ wrapQtAppsHook ];
50 propagatedBuildInputs = with python3.pkgs; [
63 # QtApplication.instance() does not work during tests?
66 pythonImportsCheck = [
78 dontWrapQtApps = true;
82 "\${qtWrapperArgs[@]}"
86 mkdir -p $out/share/inkscape/extensions
88 cp plugins/inkscape/* $out/share/inkscape/extensions
90 sed -i "s|cmd = \['inkcut'\]|cmd = \['$out/bin/inkcut'\]|" $out/share/inkscape/extensions/inkcut_cut.py
91 sed -i "s|cmd = \['inkcut'\]|cmd = \['$out/bin/inkcut'\]|" $out/share/inkscape/extensions/inkcut_open.py
95 homepage = "https://www.codelv.com/projects/inkcut/";
96 description = "Control 2D plotters, cutters, engravers, and CNC machines";
97 mainProgram = "inkcut";
98 license = licenses.gpl3;
99 maintainers = with maintainers; [ raboof ];