2008-11-11 09:53:47 +01:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
2009-05-20 01:25:58 +02:00
|
|
|
fullDepEntry = args.fullDepEntry;
|
2008-11-12 12:13:49 +01:00
|
|
|
doPatchShebangs = args.doPatchShebangs;
|
2008-11-11 09:53:47 +01:00
|
|
|
|
2009-05-24 12:57:41 +02:00
|
|
|
version = lib.attrByPath ["version"] "2008.03.30" args;
|
2008-11-11 09:53:47 +01:00
|
|
|
buildInputs = with args; [
|
|
|
|
zlib sqlite gmp libffi cairo ncurses freetype mesa
|
|
|
|
libpng libtiff libjpeg readline libsndfile libxml2
|
2009-04-16 21:25:22 +02:00
|
|
|
freeglut e2fsprogs libsamplerate pcre libevent libedit
|
2008-11-11 09:53:47 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = /* Here a fetchurl expression goes */
|
|
|
|
fetchurl {
|
|
|
|
url = "http://github.com/stevedekorte/io/tarball/${version}";
|
|
|
|
name = "io-${version}.tar.gz";
|
2009-12-15 08:29:49 +01:00
|
|
|
sha256 = "1i1hcidcf93145jj1vwwa2jvp8lb25pn2kg0cb56a059narrqxlv";
|
2008-11-11 09:53:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
makeFlags = ["INSTALL_PREFIX=$out"];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
2008-11-12 12:13:49 +01:00
|
|
|
phaseNames = ["preBuild" "doMakeInstall" "postInstall" (doPatchShebangs "$out/share/io/samples")
|
|
|
|
(doPatchShebangs "$out/lib/io")];
|
2008-11-11 09:53:47 +01:00
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
preBuild = fullDepEntry (''
|
2008-11-11 09:53:47 +01:00
|
|
|
for i in $pkgs ${
|
|
|
|
if args.stdenv ? glibc then args.stdenv.glibc else ""
|
2008-11-11 14:07:09 +01:00
|
|
|
} ${
|
|
|
|
if args ? libffi && args.libffi != null then "$(echo ${args.libffi}/lib/*/include/..)" else ""
|
2008-11-11 09:53:47 +01:00
|
|
|
}; do
|
2008-11-11 14:07:09 +01:00
|
|
|
echo "Path: $i"
|
2008-11-11 09:53:47 +01:00
|
|
|
sed -i build/AddonBuilder.io -e '/"\/sw"/asearchPrefixes append("'"$i"'"); '
|
2008-11-12 12:13:49 +01:00
|
|
|
sed -i addons/Flux/io/Flux.io -e 's@/usr/local/@'"$out/"'@g'
|
2008-11-11 09:53:47 +01:00
|
|
|
done
|
|
|
|
'') ["minInit" "addInputs" "doUnpack"];
|
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
postInstall = fullDepEntry (''
|
2008-11-12 12:13:49 +01:00
|
|
|
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 09:53:47 +01:00
|
|
|
name = "io-" + version;
|
|
|
|
meta = {
|
|
|
|
description = "Io programming language";
|
2009-12-15 08:29:49 +01:00
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib,platforms.linux;
|
2008-11-11 09:53:47 +01:00
|
|
|
};
|
|
|
|
}
|