Merge pull request #128037 from jtojnar/inkscape-app-trans

inkscape-extensions.applytransforms: 0.0.0+unstable=2021-05-11

authored by Jan Tojnar and committed by GitHub 69015ede 64d2892c

+106 -2
+10
pkgs/applications/graphics/inkscape/default.nix
··· 4 4 , cairo 5 5 , cmake 6 6 , fetchurl 7 + , fetchpatch 7 8 , gettext 8 9 , ghostscript 9 10 , glib ··· 70 71 # Python is used at run-time to execute scripts, 71 72 # e.g., those from the "Effects" menu. 72 73 python3 = "${python3Env}/bin/python"; 74 + }) 75 + 76 + # Fix parsing paths by Python extensions. 77 + # https://gitlab.com/inkscape/extensions/-/merge_requests/342 78 + (fetchpatch { 79 + url = "https://gitlab.com/inkscape/extensions/-/commit/a82c382c610d37837c8f3f5b13224bab8fd3667e.patch"; 80 + sha256 = "YWrgjCnQ9q6BUsxSLQojIXnDzPxM/SgrIfj1gxQ/JKM="; 81 + stripLen = 1; 82 + extraPrefix = "share/extensions/"; 73 83 }) 74 84 ]; 75 85
+3
pkgs/applications/graphics/inkscape/extensions.nix
··· 2 2 , fetchFromGitHub 3 3 , runCommand 4 4 , inkcut 5 + , callPackage 5 6 }: 6 7 7 8 { 9 + applytransforms = callPackage ./extensions/applytransforms { }; 10 + 8 11 hexmap = stdenv.mkDerivation { 9 12 name = "hexmap"; 10 13 version = "2020-06-06";
+42
pkgs/applications/graphics/inkscape/extensions/applytransforms/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , python3 5 + }: 6 + 7 + stdenv.mkDerivation { 8 + pname = "inkscape-applytransforms"; 9 + version = "0.0.0+unstable=2021-05-11"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "Klowner"; 13 + repo = "inkscape-applytransforms"; 14 + rev = "5b3ed4af0fb66e399e686fc2b649b56db84f6042"; 15 + sha256 = "XWwkuw+Um/cflRWjIeIgQUxJLrk2DLDmx7K+pMWvIlI="; 16 + }; 17 + 18 + checkInputs = [ 19 + python3.pkgs.inkex 20 + python3.pkgs.pytestCheckHook 21 + ]; 22 + 23 + dontBuild = true; 24 + 25 + doCheck = true; 26 + 27 + installPhase = '' 28 + runHook preInstall 29 + 30 + install -Dt "$out/share/inkscape/extensions" *.inx *.py 31 + 32 + runHook postInstall 33 + ''; 34 + 35 + meta = with lib; { 36 + description = "Inkscape extension which removes all matrix transforms by applying them recursively to shapes"; 37 + homepage = "https://github.com/Klowner/inkscape-applytransforms"; 38 + license = licenses.gpl2Only; 39 + maintainers = with maintainers; [ jtojnar ]; 40 + platforms = platforms.all; 41 + }; 42 + }
+8 -2
pkgs/applications/graphics/inkscape/with-extensions.nix
··· 2 2 , inkscape 3 3 , symlinkJoin 4 4 , makeWrapper 5 - , inkscapeExtensions ? [] 5 + , inkscapeExtensions ? [ ] 6 + , inkscape-extensions 6 7 }: 7 8 9 + let 10 + allExtensions = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (lib.attrValues inkscape-extensions); 11 + selectedExtensions = if inkscapeExtensions == null then allExtensions else inkscapeExtensions; 12 + in 13 + 8 14 symlinkJoin { 9 15 name = "inkscape-with-extensions-${lib.getVersion inkscape}"; 10 16 11 - paths = [ inkscape ] ++ inkscapeExtensions; 17 + paths = [ inkscape ] ++ selectedExtensions; 12 18 13 19 nativeBuildInputs = [ makeWrapper ]; 14 20
+41
pkgs/development/python-modules/inkex/default.nix
··· 1 + { buildPythonPackage 2 + , inkscape 3 + , lxml 4 + , python 5 + }: 6 + 7 + buildPythonPackage { 8 + pname = "inkex"; 9 + inherit (inkscape) version; 10 + 11 + format = "other"; 12 + 13 + propagatedBuildInputs = [ 14 + lxml 15 + ]; 16 + 17 + # We just copy the files. 18 + dontUnpack = true; 19 + dontBuild = true; 20 + 21 + # No tests installed. 22 + doCheck = false; 23 + 24 + installPhase = '' 25 + runHook preInstall 26 + 27 + mkdir -p "$out/${python.sitePackages}" 28 + cp -r "${inkscape}/share/inkscape/extensions/inkex" "$out/${python.sitePackages}" 29 + 30 + runHook postInstall 31 + ''; 32 + 33 + meta = inkscape.meta // { 34 + description = "Inkscape Extensions Library"; 35 + longDescription = '' 36 + This module provides support for inkscape extensions, it includes support for opening svg files and processing them. 37 + 38 + Standalone, it is especially useful for running tests for Inkscape extensions. 39 + ''; 40 + }; 41 + }
+2
pkgs/top-level/python-packages.nix
··· 3498 3498 3499 3499 injector = callPackage ../development/python-modules/injector { }; 3500 3500 3501 + inkex = callPackage ../development/python-modules/inkex { }; 3502 + 3501 3503 inotify-simple = callPackage ../development/python-modules/inotify-simple { }; 3502 3504 3503 3505 inquirer = callPackage ../development/python-modules/inquirer { };