vim-language-server: fix noBrokenSymlinks complaint
[NixPkgs.git] / pkgs / applications / graphics / inkscape / with-extensions.nix
blob7970cdfb89a4cbd36a3e2f5740ad460d1607a660
2   lib,
3   inkscape,
4   symlinkJoin,
5   makeWrapper,
6   inkscapeExtensions ? [ ],
7   inkscape-extensions,
8 }:
10 let
11   allExtensions = lib.filter (pkg: lib.isDerivation pkg && !pkg.meta.broken or false) (
12     lib.attrValues inkscape-extensions
13   );
14   selectedExtensions = if inkscapeExtensions == null then allExtensions else inkscapeExtensions;
17 symlinkJoin {
18   name = "inkscape-with-extensions-${lib.getVersion inkscape}";
20   paths = [ inkscape ] ++ selectedExtensions;
22   nativeBuildInputs = [ makeWrapper ];
24   postBuild = ''
25     rm -f $out/bin/inkscape
26     makeWrapper "${inkscape}/bin/inkscape" "$out/bin/inkscape" --set INKSCAPE_DATADIR "$out/share"
27   '';
29   inherit (inkscape) meta;