about summary refs log tree commit diff
path: root/pkgs/development/interpreters/angelscript
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2011-04-08 06:52:31 +0000
committerMichael Raskin <7c6f434c@mail.ru>2011-04-08 06:52:31 +0000
commit2b61f3f4e51514241dcd35db0a885c558ee8040c (patch)
tree44b3f39cd169a21a14e06367007c34bc7ee3d1bf /pkgs/development/interpreters/angelscript
parentcd86629a8ac15ecc1bab9863237c75476667925a (diff)
downloadnixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.tar
nixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.tar.gz
nixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.tar.bz2
nixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.tar.lz
nixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.tar.xz
nixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.tar.zst
nixlib-2b61f3f4e51514241dcd35db0a885c558ee8040c.zip
Adding AngelScript interpreter library
svn path=/nixpkgs/trunk/; revision=26748
Diffstat (limited to 'pkgs/development/interpreters/angelscript')
-rw-r--r--pkgs/development/interpreters/angelscript/default.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/angelscript/default.nix b/pkgs/development/interpreters/angelscript/default.nix
new file mode 100644
index 000000000000..65ff72bae56f
--- /dev/null
+++ b/pkgs/development/interpreters/angelscript/default.nix
@@ -0,0 +1,65 @@
+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";
+    version="2.20.2";
+    name="${baseName}-${version}";
+    url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
+    hash="0s5d6av27dl6kxkzns011zwznj7r8zy5ypfhl6x9r1kzaqdkqz2a";
+  };
+in
+rec {
+  src = a.fetchurl {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+  };
+
+  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
+    sed -i makefile -e "s@LOCAL = .*@LOCAL = $out@"
+    ensureDir "$out/lib" "$out/bin" "$out/share" "$out/include"
+    export SHARED=1 
+    export VERSION="${version}"
+  '' ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
+
+  cleanLib = a.fullDepEntry ''
+    rm ../../lib/*
+  '' ["minInit"];
+
+  installDocs = a.fullDepEntry ''
+    ensureDir "$out/share/angelscript"
+    cp -r ../../../docs  "$out/share/angelscript"
+  '' ["defEnsureDir" "prepareBuild"];
+      
+  meta = {
+    description = "A light-weight scripting library";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+    license = a.lib.licenses.zlib;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://www.angelcode.com/angelscript/downloads.asp";
+    };
+  };
+}) x
+