From 67b4880faa39b71356c6a085d4addce61a4f454d Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Mon, 10 Aug 2020 23:24:20 +0200 Subject: [PATCH] inkscape: introduce a way to add external extensions Co-Authored-By: Stefan Siegl --- .../graphics/inkscape/with-extensions.nix | 21 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/applications/graphics/inkscape/with-extensions.nix diff --git a/pkgs/applications/graphics/inkscape/with-extensions.nix b/pkgs/applications/graphics/inkscape/with-extensions.nix new file mode 100644 index 00000000000..cca7b1fc3a5 --- /dev/null +++ b/pkgs/applications/graphics/inkscape/with-extensions.nix @@ -0,0 +1,21 @@ +{ lib +, inkscape +, symlinkJoin +, makeWrapper +, inkscapeExtensions ? [] +}: + +symlinkJoin { + name = "inkscape-with-extensions-${lib.getVersion inkscape}"; + + paths = [ inkscape ] ++ inkscapeExtensions; + + buildInputs = [ makeWrapper ]; + + postBuild = '' + rm -f $out/bin/inkscape + makeWrapper "${inkscape}/bin/inkscape" "$out/bin/inkscape" --set INKSCAPE_DATADIR "$out/share" + ''; + + inherit (inkscape) meta; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b0985e7839..658e7f38e9a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20927,6 +20927,8 @@ in lcms = lcms2; }; + inkscape-with-extensions = callPackage ../applications/graphics/inkscape/with-extensions.nix { }; + inkscape_0 = callPackage ../applications/graphics/inkscape/0.x.nix { lcms = lcms2; };