9 python3.pkgs.buildPythonApplication rec {
13 src = fetchFromGitHub {
16 rev = "refs/tags/v${version}";
17 sha256 = "sha256-S5IrNWVoUp1w+P7DrKlOUOyY3Q16CHSct9ndZOB3UpU=";
21 # fix opening the extension on inkscape 1.2
22 # https://github.com/inkcut/inkcut/pull/340
24 url = "https://github.com/inkcut/inkcut/commit/d5d5d0ab3c588c576b668f4c7b07a10609ba2fd0.patch";
25 hash = "sha256-szfiOujuV7OOwYK/OU51m9FK6dzkbWds+h0cr5dGIg4=";
27 # fix loading a document from stdin (as used from the extension)
28 # https://github.com/inkcut/inkcut/issues/341
30 url = "https://github.com/inkcut/inkcut/commit/748ab4157f87afec37dadd715094e87d02c9c739.patch";
31 hash = "sha256-ZGiwZru2bUYu749YSz5vxmGwLTAoYIAsafcX6PmdbYo=";
34 # fix distutils deprecation error
35 # https://github.com/inkcut/inkcut/pull/343
37 url = "https://github.com/inkcut/inkcut/commit/9fb95204981bcc51401a1bc10caa02d1fae0d6cb.patch";
38 hash = "sha256-nriys7IWPGykZjVz+DIDsE9Tm40DewkHQlIUaxFwtzM=";
43 substituteInPlace inkcut/device/transports/printer/plugin.py \
44 --replace ", 'lpr', " ", '${cups}/bin/lpr', "
47 nativeBuildInputs = [ wrapQtAppsHook ];
49 propagatedBuildInputs = with python3.pkgs; [
62 # QtApplication.instance() does not work during tests?
65 pythonImportsCheck = [
77 dontWrapQtApps = true;
78 makeWrapperArgs = [ "--unset" "PYTHONPATH" "\${qtWrapperArgs[@]}" ];
81 mkdir -p $out/share/inkscape/extensions
83 cp plugins/inkscape/* $out/share/inkscape/extensions
85 sed -i "s|cmd = \['inkcut'\]|cmd = \['$out/bin/inkcut'\]|" $out/share/inkscape/extensions/inkcut_cut.py
86 sed -i "s|cmd = \['inkcut'\]|cmd = \['$out/bin/inkcut'\]|" $out/share/inkscape/extensions/inkcut_open.py
90 homepage = "https://www.codelv.com/projects/inkcut/";
91 description = "Control 2D plotters, cutters, engravers, and CNC machines";
92 mainProgram = "inkcut";
93 license = licenses.gpl3;
94 maintainers = with maintainers; [ raboof ];