2008-11-11 08:53:47 +00:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
|
|
|
FullDepEntry = args.FullDepEntry;
|
2008-11-12 11:13:49 +00:00
|
|
|
doPatchShebangs = args.doPatchShebangs;
|
2008-11-11 08:53:47 +00:00
|
|
|
|
|
|
|
version = lib.getAttr ["version"] "2008.03.30" args;
|
|
|
|
buildInputs = with args; [
|
|
|
|
zlib sqlite gmp libffi cairo ncurses freetype mesa
|
|
|
|
libpng libtiff libjpeg readline libsndfile libxml2
|
2008-11-11 13:07:09 +00:00
|
|
|
freeglut e2fsprogs libsamplerate pcre libevent editline
|
2008-11-11 08:53:47 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = /* Here a fetchurl expression goes */
|
|
|
|
fetchurl {
|
|
|
|
url = "http://github.com/stevedekorte/io/tarball/${version}";
|
|
|
|
name = "io-${version}.tar.gz";
|
|
|
|
sha256 = "1vdjyqv86l290kzhyw8mwzfqgb279dl9nqmy6bih6g8n4yz36ady";
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
makeFlags = ["INSTALL_PREFIX=$out"];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
2008-11-12 11:13:49 +00:00
|
|
|
phaseNames = ["preBuild" "doMakeInstall" "postInstall" (doPatchShebangs "$out/share/io/samples")
|
|
|
|
(doPatchShebangs "$out/lib/io")];
|
2008-11-11 08:53:47 +00:00
|
|
|
|
|
|
|
preBuild = FullDepEntry (''
|
|
|
|
for i in $pkgs ${
|
|
|
|
if args.stdenv ? glibc then args.stdenv.glibc else ""
|
2008-11-11 13:07:09 +00:00
|
|
|
} ${
|
|
|
|
if args ? libffi && args.libffi != null then "$(echo ${args.libffi}/lib/*/include/..)" else ""
|
2008-11-11 08:53:47 +00:00
|
|
|
}; do
|
2008-11-11 13:07:09 +00:00
|
|
|
echo "Path: $i"
|
2008-11-11 08:53:47 +00:00
|
|
|
sed -i build/AddonBuilder.io -e '/"\/sw"/asearchPrefixes append("'"$i"'"); '
|
2008-11-12 11:13:49 +00:00
|
|
|
sed -i addons/Flux/io/Flux.io -e 's@/usr/local/@'"$out/"'@g'
|
2008-11-11 08:53:47 +00:00
|
|
|
done
|
|
|
|
'') ["minInit" "addInputs" "doUnpack"];
|
|
|
|
|
2008-11-12 11:13:49 +00:00
|
|
|
postInstall = FullDepEntry (''
|
|
|
|
ensureDir $out/share/io
|
|
|
|
|
|
|
|
ln -s $out/lib/io/addons $out/share/io
|
|
|
|
cp -r samples $out/share/io
|
|
|
|
'') ["minInit" "doUnpack" "defEnsureDir" "doMakeInstall"];
|
|
|
|
|
2008-11-11 08:53:47 +00:00
|
|
|
name = "io-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Io programming language";
|
|
|
|
};
|
|
|
|
}
|