2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
|
|
|
rec {
|
|
|
|
baseName="angelscript";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "2.35.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "sha256-AQ3UXiPnNNRvWJHXDiaGB6EsuasSUD3aQvhC2dt+iFc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip cmake ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
export ROOT=$PWD
|
|
|
|
cd angelscript/projects/cmake
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/share/docs/angelscript"
|
2021-05-20 23:08:51 +00:00
|
|
|
cp -r $ROOT/docs/* "$out/share/docs/angelscript"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit (s) version;
|
|
|
|
description = "Light-weight scripting library";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.zlib;
|
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
downloadPage = "https://www.angelcode.com/angelscript/downloads.html";
|
|
|
|
homepage = "https://www.angelcode.com/angelscript/";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|