2021-10-08 15:17:17 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, unzip
|
|
|
|
, cmake
|
|
|
|
}:
|
2021-03-19 17:17:44 +00:00
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "angelscript";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "2.36.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2021-10-08 15:17:17 +00:00
|
|
|
url = "https://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
|
2022-10-06 18:32:54 +00:00
|
|
|
sha256 = "sha256-M/lfdZe8DYiwl9NeexMg0VQZ/8V3mFHZ0qbMzsV4EbM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
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
|
|
|
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
|
|
|
};
|
|
|
|
}
|