Adding asymptote graphic generation tool

svn path=/nixpkgs/trunk/; revision=20158
This commit is contained in:
Michael Raskin 2010-02-21 17:36:41 +00:00
parent 2b78535ef9
commit 5c8272b0bc
4 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,54 @@
a @ {
freeglut,ghostscriptX,imagemagick,fftw,
boehmgc,mesa,ncurses,readline,gsl,libsigsegv,
python,zlib, perl, texLive, texinfo, lzma,
noDepEntry, fullDepEntry, fetchUrlFromSrcInfo,
lib,
...}:
let
s = import ./src-for-default.nix;
buildInputs = with a; [
freeglut ghostscriptX imagemagick fftw boehmgc
mesa ncurses readline gsl libsigsegv python zlib
perl texLive texinfo lzma
];
in
rec {
src = a.fetchUrlFromSrcInfo s;
inherit (s) name;
inherit buildInputs;
configureFlags = [];
/* doConfigure should be removed if not needed */
phaseNames = ["setVars" "doUnpack" "fixPaths" "extractTexinfoTex"
"doConfigure" "dumpRealVars" "doMakeInstall" "fixPathsResult"];
setVars = a.noDepEntry ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.boehmgc}/include/gc"
export HOME="$PWD"
'';
dumpRealVars = a.noDepEntry ''
set > ../real-env-vars
'';
fixPaths = a.doPatchShebangs ''.'';
fixPathsResult = a.doPatchShebangs ''$out/bin'';
extractTexinfoTex = a.fullDepEntry ''
lzma -d < ${a.texinfo.src} | tar --wildcards -x texinfo-'*'/doc/texinfo.tex
cp texinfo-*/doc/texinfo.tex doc/
'' ["minInit" "addInputs" "doUnpack"];
meta = {
description = "A tool for programming graphics intended to replace Metapost";
maintainers = [
a.lib.maintainers.raskin
];
platforms = with a.lib.platforms;
linux ++ freebsd ++ darwin;
};
}

View File

@ -0,0 +1,9 @@
rec {
version="1.91";
name="asymptote-1.91";
hash="1bchzl8czhhjz47mr68m0ysj0dp09ks69qx3l46is3h6rj4bj1sp";
url="http://downloads.sourceforge.net/asymptote/files/asymptote/${version}/asymptote-${version}.src.tgz";
advertisedUrl="http://downloads.sourceforge.net/asymptote/files/asymptote/1.91/asymptote-1.91.src.tgz";
}

View File

@ -0,0 +1,8 @@
{
downloadPage = "http://sourceforge.net/projects/asymptote/files/";
baseName = "asymptote";
sourceRegexp = ".*[.]src[.]tgz";
versionExtractorSedScript = ''$extractReleaseSF'';
versionReferenceCreator = ''$(replaceAllVersionOccurences)'';
choiceCommand = ''head -1 | sed -re "$skipRedirectSF"'';
}

View File

@ -346,6 +346,17 @@ let
inherit fetchurl stdenv libpcap openssl zlib wirelesstools;
};
asymptote = builderDefsPackage ../tools/graphics/asymptote {
inherit freeglut ghostscriptX imagemagick fftw boehmgc
mesa ncurses readline gsl libsigsegv python zlib perl
texinfo lzma;
texLive = texLiveAggregationFun {
paths = [
texLive texLiveExtra
];
};
};
ec2apitools = import ../tools/virtualization/amazon-ec2-api-tools {
inherit stdenv fetchurl unzip makeWrapper jre;
};