My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/applications/graphics/inkscape/with-extensions.nix

27 lines
673 B

{ lib
, inkscape
, symlinkJoin
, makeWrapper
, 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 ] ++ selectedExtensions;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
rm -f $out/bin/inkscape
makeWrapper "${inkscape}/bin/inkscape" "$out/bin/inkscape" --set INKSCAPE_DATADIR "$out/share"
'';
inherit (inkscape) meta;
}