summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-06-26 18:04:40 +0000
committerGitHub <noreply@github.com>2021-06-26 18:04:40 +0000
commit8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e (patch)
treea7257856d455a94f50d8e1d43f5f85ec7ef5994b /pkgs/applications/graphics
parent071e8ee2f704ef6e4c70c8be83c48ea6984f5688 (diff)
parente127f77b045e9f7aa0f7a2d483e3e957256a6bb0 (diff)
downloadnixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.tar
nixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.tar.gz
nixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.tar.bz2
nixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.tar.lz
nixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.tar.xz
nixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.tar.zst
nixpkgs-8f71a7f33524bf3cdb2bd4df0ab0cf7a29a3115e.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/ImageMagick/6.x.nix4
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix10
-rw-r--r--pkgs/applications/graphics/inkscape/extensions.nix3
-rw-r--r--pkgs/applications/graphics/inkscape/extensions/applytransforms/default.nix42
-rw-r--r--pkgs/applications/graphics/inkscape/with-extensions.nix10
5 files changed, 65 insertions, 4 deletions
diff --git a/pkgs/applications/graphics/ImageMagick/6.x.nix b/pkgs/applications/graphics/ImageMagick/6.x.nix
index 3432e130717..4ac4af48aab 100644
--- a/pkgs/applications/graphics/ImageMagick/6.x.nix
+++ b/pkgs/applications/graphics/ImageMagick/6.x.nix
@@ -16,13 +16,13 @@ in
 
 stdenv.mkDerivation rec {
   pname = "imagemagick";
-  version = "6.9.12-16";
+  version = "6.9.12-17";
 
   src = fetchFromGitHub {
     owner = "ImageMagick";
     repo = "ImageMagick6";
     rev = version;
-    sha256 = "sha256-kg8vt88G6huRbJlVYztKxHiFPhGz/QHuNKtbhmai790=";
+    sha256 = "sha256-yZXvxl9Tbl3JRBmRcfsjbkaxywtD08SuUnJayKfwk9M=";
   };
 
   outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 813db098475..c65dfa1b6c0 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -4,6 +4,7 @@
 , cairo
 , cmake
 , fetchurl
+, fetchpatch
 , gettext
 , ghostscript
 , glib
@@ -71,6 +72,15 @@ stdenv.mkDerivation rec {
       # e.g., those from the "Effects" menu.
       python3 = "${python3Env}/bin/python";
     })
+
+    # Fix parsing paths by Python extensions.
+    # https://gitlab.com/inkscape/extensions/-/merge_requests/342
+    (fetchpatch {
+      url = "https://gitlab.com/inkscape/extensions/-/commit/a82c382c610d37837c8f3f5b13224bab8fd3667e.patch";
+      sha256 = "YWrgjCnQ9q6BUsxSLQojIXnDzPxM/SgrIfj1gxQ/JKM=";
+      stripLen = 1;
+      extraPrefix = "share/extensions/";
+    })
   ];
 
   postPatch = ''
diff --git a/pkgs/applications/graphics/inkscape/extensions.nix b/pkgs/applications/graphics/inkscape/extensions.nix
index affd934e936..63010a19f14 100644
--- a/pkgs/applications/graphics/inkscape/extensions.nix
+++ b/pkgs/applications/graphics/inkscape/extensions.nix
@@ -2,9 +2,12 @@
 , fetchFromGitHub
 , runCommand
 , inkcut
+, callPackage
 }:
 
 {
+  applytransforms = callPackage ./extensions/applytransforms { };
+
   hexmap = stdenv.mkDerivation {
     name = "hexmap";
     version = "2020-06-06";
diff --git a/pkgs/applications/graphics/inkscape/extensions/applytransforms/default.nix b/pkgs/applications/graphics/inkscape/extensions/applytransforms/default.nix
new file mode 100644
index 00000000000..131daffffb9
--- /dev/null
+++ b/pkgs/applications/graphics/inkscape/extensions/applytransforms/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, python3
+}:
+
+stdenv.mkDerivation {
+  pname = "inkscape-applytransforms";
+  version = "0.0.0+unstable=2021-05-11";
+
+  src = fetchFromGitHub {
+    owner = "Klowner";
+    repo = "inkscape-applytransforms";
+    rev = "5b3ed4af0fb66e399e686fc2b649b56db84f6042";
+    sha256 = "XWwkuw+Um/cflRWjIeIgQUxJLrk2DLDmx7K+pMWvIlI=";
+  };
+
+  checkInputs = [
+    python3.pkgs.inkex
+    python3.pkgs.pytestCheckHook
+  ];
+
+  dontBuild = true;
+
+  doCheck = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dt "$out/share/inkscape/extensions" *.inx *.py
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Inkscape extension which removes all matrix transforms by applying them recursively to shapes";
+    homepage = "https://github.com/Klowner/inkscape-applytransforms";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ jtojnar ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/graphics/inkscape/with-extensions.nix b/pkgs/applications/graphics/inkscape/with-extensions.nix
index c558a6bb062..14fffadd036 100644
--- a/pkgs/applications/graphics/inkscape/with-extensions.nix
+++ b/pkgs/applications/graphics/inkscape/with-extensions.nix
@@ -2,13 +2,19 @@
 , inkscape
 , symlinkJoin
 , makeWrapper
-, inkscapeExtensions ? []
+, inkscapeExtensions ? [ ]
+, inkscape-extensions
 }:
 
+let
+  allExtensions = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (lib.attrValues inkscape-extensions);
+  selectedExtensions = if inkscapeExtensions == null then allExtensions else inkscapeExtensions;
+in
+
 symlinkJoin {
   name = "inkscape-with-extensions-${lib.getVersion inkscape}";
 
-  paths = [ inkscape ] ++ inkscapeExtensions;
+  paths = [ inkscape ] ++ selectedExtensions;
 
   nativeBuildInputs = [ makeWrapper ];