summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2020-04-14 10:21:25 +0200
committerGitHub <noreply@github.com>2020-04-14 10:21:25 +0200
commit0995d779a3503e2cd8a8f8883d2dde4ded99538e (patch)
tree5480c39ad9797cca31e785c104d4c6afe97d7d8c /pkgs
parent2ac39a1ec6d62c91b6b676371fa1bd56214a75ae (diff)
parenta926e7358f47d6a00edf76547547b5d7246abef4 (diff)
downloadnixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.tar
nixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.tar.gz
nixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.tar.bz2
nixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.tar.lz
nixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.tar.xz
nixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.tar.zst
nixpkgs-0995d779a3503e2cd8a8f8883d2dde4ded99538e.zip
Merge pull request #85184 from jtojnar/inkscape-0.92.5
inkscape: 0.92.4 → 0.92.5
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/graphics/inkscape/default.nix141
1 files changed, 90 insertions, 51 deletions
diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix
index 763c9f4db22..819b7478947 100644
--- a/pkgs/applications/graphics/inkscape/default.nix
+++ b/pkgs/applications/graphics/inkscape/default.nix
@@ -1,54 +1,62 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, perlPackages, libXft
-, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
-, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper
-, gsl, gtkspell2, cairo, python2, poppler, imagemagick, libwpg, librevenge
-, libvisio, libcdr, libexif, potrace, cmake
-, librsvg, wrapGAppsHook
+{ stdenv
+, boehmgc
+, boost
+, cairo
+, cmake
+, fetchpatch
+, fetchurl
+, gettext
+, glib
+, glibmm
+, gsl
+, gtkmm2
+, gtkspell2
+, imagemagick
+, lcms
+, libcdr
+, libexif
+, libpng
+, librevenge
+, librsvg
+, libsigcxx
+, libvisio
+, libwpg
+, libXft
+, libxml2
+, libxslt
+, makeWrapper
+, perlPackages
+, pkg-config
+, poppler
+, popt
+, potrace
+, python3
+, wrapGAppsHook
+, zlib
 }:
-
 let
-  python2Env = python2.withPackages(ps: with ps;
-    [ numpy lxml scour ]);
+  python3Env = python3.withPackages
+    (ps: with ps; [
+      numpy
+      lxml
+      scour
+    ]);
 in
-
 stdenv.mkDerivation rec {
-  name = "inkscape-0.92.4";
+  pname = "inkscape";
+  version = "0.92.5";
 
   src = fetchurl {
-    url = "https://media.inkscape.org/dl/resources/file/${name}.tar.bz2";
-    sha256 = "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p";
+    url = "https://media.inkscape.org/dl/resources/file/${pname}-${version}.tar.bz2";
+    sha256 = "ge5/aeK9ZKlzQ9g5Wkp6eQWyG4YVZu1eXZF5F41Rmgs=";
   };
 
-  patches = [
-    (fetchpatch {
-      name = "inkscape-poppler_0_76_compat.patch";
-      url = "https://gitlab.com/inkscape/inkscape/commit/e831b034746f8dc3c3c1b88372751f6dcb974831.diff";
-      sha256 = "096rdyi6ppjq1h9jwwsm9hb99nggfrfinik8rm23jkn4h2zl01zf";
-    })
-    (fetchpatch {
-      name = "inkscape-poppler_0_82_compat.patch";
-      url = "https://gitlab.com/inkscape/inkscape/commit/835b6bb62be565efab986d5a3f30a672ad56c7eb.patch";
-      sha256 = "02c6sxi2w52b885vr3pgani6kvxp9gdqqk2jgiykkdzv70hhrnm7";
-    })
-    (fetchpatch {
-      name = "inkscape-poppler_0_83_compat.patch";
-      url = "https://gitlab.com/inkscape/inkscape/commit/b5360a807b12d4e8318475ffd0464b84882788b5.patch";
-      sha256 = "1p44rr2q2i3zkd1y1j7xgdcbgx8yvlq6hq92im8s0bkjby6p5cpz";
-    })
-  ];
-
   # Inkscape hits the ARGMAX when linking on macOS. It appears to be
   # CMake’s ARGMAX check doesn’t offer enough padding for NIX_LDFLAGS.
   # Setting strictDeps it avoids duplicating some dependencies so it
   # will leave us under ARGMAX.
   strictDeps = true;
 
-  unpackPhase = ''
-    cp $src ${name}.tar.bz2
-    tar xvjf ${name}.tar.bz2 > /dev/null
-    cd ${name}
-  '';
-
   postPatch = ''
     patchShebangs share/extensions
     patchShebangs fix-roff-punct
@@ -56,22 +64,52 @@ stdenv.mkDerivation rec {
     # Python is used at run-time to execute scripts, e.g., those from
     # the "Effects" menu.
     substituteInPlace src/extension/implementation/script.cpp \
-      --replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"'
+      --replace '"python-interpreter", "python"' '"python-interpreter", "${python3Env}/bin/python"'
   '';
 
-  nativeBuildInputs = [ pkgconfig cmake makeWrapper python2Env wrapGAppsHook ]
-    ++ (with perlPackages; [ perl XMLParser ]);
-  buildInputs = [
-    libXft libpng zlib popt boehmgc
-    libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
-    gsl poppler imagemagick libwpg librevenge
-    libvisio libcdr libexif potrace
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    makeWrapper
+    python3Env
+    wrapGAppsHook
+  ] ++ (with perlPackages; [
+    perl
+    XMLParser
+  ]);
 
+  buildInputs = [
+    boehmgc
+    boost
+    gettext
+    glib
+    glibmm
+    gsl
+    gtkmm2
+    imagemagick
+    lcms
+    libcdr
+    libexif
+    libpng
+    librevenge
     librsvg # for loading icons
-
-    python2Env perlPackages.perl
-  ] ++ stdenv.lib.optional (!stdenv.isDarwin) gtkspell2
-    ++ stdenv.lib.optional stdenv.isDarwin cairo;
+    libsigcxx
+    libvisio
+    libwpg
+    libXft
+    libxml2
+    libxslt
+    perlPackages.perl
+    poppler
+    popt
+    potrace
+    python3Env
+    zlib
+  ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [
+    gtkspell2
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [
+    cairo
+  ];
 
   enableParallelBuilding = true;
 
@@ -82,9 +120,10 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with stdenv.lib; {
-    license = "GPL";
-    homepage = "https://www.inkscape.org";
     description = "Vector graphics editor";
+    homepage = "https://www.inkscape.org";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.jtojnar ];
     platforms = platforms.all;
     longDescription = ''
       Inkscape is a feature-rich vector graphics editor that edits