dot2ps
svn path=/nixpkgs/trunk/; revision=5152
This commit is contained in:
parent
57c5067b07
commit
00bdbb7fff
@ -56,6 +56,20 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
dot2ps =
|
||||||
|
{ dotGraph
|
||||||
|
}:
|
||||||
|
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
name = "ps";
|
||||||
|
builder = ./dot2ps.sh;
|
||||||
|
inherit dotGraph;
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation {
|
animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation {
|
||||||
name = "dot-frames";
|
name = "dot-frames";
|
||||||
builder = ./animatedot.sh;
|
builder = ./animatedot.sh;
|
||||||
|
19
pkgs/misc/tex/nix/dot2ps.sh
Normal file
19
pkgs/misc/tex/nix/dot2ps.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
ensureDir $out
|
||||||
|
|
||||||
|
dot2ps() {
|
||||||
|
sourceFile=$1
|
||||||
|
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).ps
|
||||||
|
echo "converting $sourceFile to $targetName..."
|
||||||
|
dot -Tps $sourceFile > $targetName
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in $dotGraph; do
|
||||||
|
if test -d $i; then
|
||||||
|
for j in $i/*; do dot2ps $j; done
|
||||||
|
else
|
||||||
|
dot2ps $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user