-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303748 from TuxCoder/inkscape_eps
inkscape: fix path patch
- Loading branch information
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
pkgs/applications/graphics/inkscape/test-ps2pdf-plugin.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ inkscape, runCommand, writeTextFile }: | ||
|
||
let | ||
svg_file = writeTextFile { | ||
name = "test.svg"; | ||
text = '' | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<svg width="50" height="50" version="1.1"> | ||
<ellipse cx="1" cy="1" rx="1" ry="1" /> | ||
</svg>''; | ||
}; | ||
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 | ||
'' |