diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 35000a06de02e..fcc56fd14dd0e 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -3,6 +3,7 @@ , boehmgc , boost , cairo +, callPackage , cmake , desktopToDarwinBundle , fetchurl @@ -172,6 +173,8 @@ stdenv.mkDerivation rec { done ''; + passthru.tests.ps2pdf-plugin = callPackage ./test-ps2pdf-plugin.nix { }; + meta = with lib; { description = "Vector graphics editor"; homepage = "https://www.inkscape.org"; diff --git a/pkgs/applications/graphics/inkscape/test-ps2pdf-plugin.nix b/pkgs/applications/graphics/inkscape/test-ps2pdf-plugin.nix new file mode 100644 index 0000000000000..3e55557c860e1 --- /dev/null +++ b/pkgs/applications/graphics/inkscape/test-ps2pdf-plugin.nix @@ -0,0 +1,27 @@ +{ inkscape, runCommand, writeTextFile }: + +let + svg_file = writeTextFile { + name = "test.svg"; + text = '' + + + +''; + }; +in +runCommand "inkscape-test-eps" +{ + nativeBuildInputs = [ inkscape ]; +} '' + echo ps test + inkscape ${svg_file} --export-type=ps -o test.ps + inkscape test.ps -o test.ps.svg + + echo eps test + inkscape ${svg_file} --export-type=eps -o test.eps + inkscape test.eps -o test.eps.svg + + # inkscape does not return an error code, only does not create files + [[ -f test.ps.svg && -f test.eps.svg ]] && touch $out +''