mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
dot2ps
svn path=/nixpkgs/trunk/; revision=5152
This commit is contained in:
parent
57c5067b07
commit
00bdbb7fff
|
@ -56,10 +56,24 @@ 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 {
|
||||
name = "dot-frames";
|
||||
builder = ./animatedot.sh;
|
||||
inherit dotGraph nrFrames;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
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…
Reference in a new issue