From 1dea82ff051d2d3054ca0f34571bddfa640564d8 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 25 Jun 2021 00:54:53 +0200 Subject: [PATCH] python3.pkgs.inkex: init from inkscape This is useful for testing Inkscape extensions. --- .../python-modules/inkex/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/inkex/default.nix diff --git a/pkgs/development/python-modules/inkex/default.nix b/pkgs/development/python-modules/inkex/default.nix new file mode 100644 index 000000000000..c1c5479dfd8f --- /dev/null +++ b/pkgs/development/python-modules/inkex/default.nix @@ -0,0 +1,41 @@ +{ buildPythonPackage +, inkscape +, lxml +, python +}: + +buildPythonPackage { + pname = "inkex"; + inherit (inkscape) version; + + format = "other"; + + propagatedBuildInputs = [ + lxml + ]; + + # We just copy the files. + dontUnpack = true; + dontBuild = true; + + # No tests installed. + doCheck = false; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/${python.sitePackages}" + cp -r "${inkscape}/share/inkscape/extensions/inkex" "$out/${python.sitePackages}" + + runHook postInstall + ''; + + meta = inkscape.meta // { + description = "Inkscape Extensions Library"; + longDescription = '' + This module provides support for inkscape extensions, it includes support for opening svg files and processing them. + + Standalone, it is especially useful for running tests for Inkscape extensions. + ''; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7e8624e496da..1b1f62511ec3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3493,6 +3493,8 @@ in { injector = callPackage ../development/python-modules/injector { }; + inkex = callPackage ../development/python-modules/inkex { }; + inotify-simple = callPackage ../development/python-modules/inotify-simple { }; inquirer = callPackage ../development/python-modules/inquirer { };