Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 30 lines 689 B view raw
1{ 2 lib, 3 inkscape, 4 symlinkJoin, 5 makeWrapper, 6 inkscapeExtensions ? [ ], 7 inkscape-extensions, 8}: 9 10let 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; 15in 16 17symlinkJoin { 18 name = "inkscape-with-extensions-${lib.getVersion inkscape}"; 19 20 paths = [ inkscape ] ++ selectedExtensions; 21 22 nativeBuildInputs = [ makeWrapper ]; 23 24 postBuild = '' 25 rm -f $out/bin/inkscape 26 makeWrapper "${inkscape}/bin/inkscape" "$out/bin/inkscape" --set INKSCAPE_DATADIR "$out/share" 27 ''; 28 29 inherit (inkscape) meta; 30}