1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00
svn path=/nixpkgs/trunk/; revision=5152
This commit is contained in:
Eelco Visser 2006-04-11 13:27:01 +00:00
parent 57c5067b07
commit 00bdbb7fff
2 changed files with 34 additions and 1 deletions

View file

@ -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;
};
}
}

View 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