2011-04-08 07:52:31 +01:00
|
|
|
x@{builderDefsPackage
|
|
|
|
, unzip
|
|
|
|
, ...}:
|
|
|
|
builderDefsPackage
|
|
|
|
(a :
|
|
|
|
let
|
|
|
|
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
|
|
[];
|
|
|
|
|
|
|
|
buildInputs = map (n: builtins.getAttr n x)
|
|
|
|
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
|
|
|
sourceInfo = rec {
|
|
|
|
baseName="angelscript";
|
2014-11-02 19:52:33 +00:00
|
|
|
version = "2.29.2";
|
2011-04-08 07:52:31 +01:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
|
2014-11-02 19:52:33 +00:00
|
|
|
sha256 = "12ws4vp9iyxbgzxxdq7g9729vg1ld92f38gfznyhsknhsay4kmf5";
|
2011-04-08 07:52:31 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = a.fetchurl {
|
|
|
|
url = sourceInfo.url;
|
2014-07-01 09:55:16 +01:00
|
|
|
sha256 = sourceInfo.sha256;
|
2011-04-08 07:52:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
inherit (sourceInfo) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
|
|
|
|
/* doConfigure should be removed if not needed */
|
|
|
|
phaseNames = ["prepareBuild" "doMake" "cleanLib" "doMakeInstall" "installDocs"];
|
|
|
|
|
|
|
|
prepareBuild = a.fullDepEntry ''
|
|
|
|
cd angelscript/projects/gnuc
|
2014-07-01 09:55:16 +01:00
|
|
|
sed -i makefile -e "s@LOCAL [?]= .*@LOCAL = $out@"
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/lib" "$out/bin" "$out/share" "$out/include"
|
2011-04-08 07:52:31 +01:00
|
|
|
export SHARED=1
|
|
|
|
export VERSION="${version}"
|
|
|
|
'' ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
|
|
|
|
|
|
|
|
cleanLib = a.fullDepEntry ''
|
|
|
|
rm ../../lib/*
|
|
|
|
'' ["minInit"];
|
|
|
|
|
|
|
|
installDocs = a.fullDepEntry ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/angelscript"
|
2011-04-08 07:52:31 +01:00
|
|
|
cp -r ../../../docs "$out/share/angelscript"
|
|
|
|
'' ["defEnsureDir" "prepareBuild"];
|
|
|
|
|
|
|
|
meta = {
|
2013-10-05 15:22:46 +01:00
|
|
|
description = "Light-weight scripting library";
|
2011-04-08 07:52:31 +01:00
|
|
|
maintainers = with a.lib.maintainers;
|
|
|
|
[
|
|
|
|
raskin
|
|
|
|
];
|
|
|
|
platforms = with a.lib.platforms;
|
|
|
|
linux;
|
|
|
|
license = a.lib.licenses.zlib;
|
2014-07-01 09:55:16 +01:00
|
|
|
homepage="http://www.angelcode.com/angelscript/";
|
|
|
|
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
|
|
|
|
inherit version;
|
2011-04-08 07:52:31 +01:00
|
|
|
};
|
|
|
|
}) x
|
|
|
|
|