a996d01af9
svn path=/nixpkgs/trunk/; revision=18927
89 lines
2.4 KiB
Nix
89 lines
2.4 KiB
Nix
a :
|
|
let
|
|
fetchurl = a.fetchurl;
|
|
|
|
version = "1.5";
|
|
buildInputs = with a; [
|
|
mesa lesstif libX11 libXaw xproto libXt libSM libICE
|
|
libXmu libXext
|
|
];
|
|
in
|
|
rec {
|
|
srcNcbiStdH = fetchurl {
|
|
url = "http://www.math.uu.nl/people/kuznet/CONTENT/src/unix/ncbistd.h";
|
|
sha256 = "1zi3l53b0a7d3620rhxvh1jn7pz3ihl1mxl9qqw86xkmhm4q7xf3";
|
|
};
|
|
|
|
srcVibrant = fetchurl {
|
|
url = "http://www.math.uu.nl/people/kuznet/CONTENT/src/unix/vibrant.tar.gz";
|
|
sha256 = "1s0vsa0np3sm7jh3ps3f1sf4j64v0kw4hqasllpxx5hdgxwd8y25";
|
|
};
|
|
|
|
srcContent = fetchurl {
|
|
url = "http://www.math.uu.nl/people/kuznet/CONTENT/src/unix/content_${version}.tar.gz";
|
|
sha256 = "0y0dzr1d3jgbd53729jk6s2wpb5hv54xwbdird4r0s15bznpm6fs";
|
|
};
|
|
|
|
inherit buildInputs;
|
|
configureFlags = [];
|
|
|
|
/* doConfigure should be removed if not needed */
|
|
phaseNames = ["unpackTarballs"
|
|
"setPlatform"
|
|
"buildVibrant" "buildContent"
|
|
"install"];
|
|
|
|
unpackTarballs = a.fullDepEntry (''
|
|
mkdir content
|
|
cd content
|
|
mkdir vibrant
|
|
tar -xvf ${srcVibrant} -C vibrant
|
|
tar -xvf ${srcContent} -C .
|
|
sed -e s/SGI=/SGI=no/ -i content/makefile_v
|
|
'') ["minInit"];
|
|
|
|
platformTLAContent = if a.stdenv.isLinux then "LIN" else
|
|
throw "Three-letter code for the platform is not known";
|
|
|
|
platformTLAVibrant = if a.stdenv.isLinux then "lnx" else
|
|
throw "Three-letter code for the platform is not known";
|
|
|
|
setPlatform = a.fullDepEntry (''
|
|
sed -e 's/${platformTLAContent}=no/${platformTLAContent}=/' -i content/makefile_v
|
|
'') ["minInit" "unpackTarballs"];
|
|
|
|
buildVibrant = a.fullDepEntry (''
|
|
cd vibrant/build
|
|
|
|
export LCL=${platformTLAVibrant}
|
|
make copy
|
|
for i in *.c; do gcc $i -c -DWIN_MOTIF -I. -I../include; done
|
|
sh ../make/viball.${platformTLAVibrant}
|
|
|
|
cd ../..
|
|
'') ["addInputs" "unpackTarballs"];
|
|
|
|
buildContent = a.fullDepEntry (''
|
|
cd content
|
|
|
|
export PATH=$PATH:$PWD/victor:$PWD/yuri
|
|
make -f makefile_v unix
|
|
|
|
cd ..
|
|
'') ["addInputs" "buildVibrant" "setPlatform"];
|
|
|
|
install = a.fullDepEntry (''
|
|
ensureDir $out/share/${name}/build-snapshot
|
|
cp -r . $out/share/${name}/build-snapshot
|
|
'') ["buildContent" "defEnsureDir" "minInit"];
|
|
|
|
name = "content-" + version;
|
|
meta = {
|
|
description = "A tool for analysis of dynamical systems";
|
|
maintainers = [
|
|
a.lib.maintainers.raskin
|
|
];
|
|
platforms = a.lib.platforms.linux;
|
|
};
|
|
}
|