forked from mirrors/nixpkgs
Repackage from scratch and update angelscript
This commit is contained in:
parent
a36c914020
commit
0f8e3caec5
|
@ -1,63 +1,38 @@
|
|||
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 {
|
||||
{stdenv, fetchurl, unzip}:
|
||||
let
|
||||
s = # Generated upstream information
|
||||
rec {
|
||||
baseName="angelscript";
|
||||
version = "2.29.2";
|
||||
version = "2.30.0";
|
||||
name="${baseName}-${version}";
|
||||
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
|
||||
sha256 = "12ws4vp9iyxbgzxxdq7g9729vg1ld92f38gfznyhsknhsay4kmf5";
|
||||
sha256 = "00w7h2g6g1lkq9ahsvzyk78nbdzhn1adsrns9mrqb2fbxv2wbz5d";
|
||||
};
|
||||
buildInputs = [
|
||||
unzip
|
||||
];
|
||||
in
|
||||
rec {
|
||||
src = a.fetchurl {
|
||||
url = sourceInfo.url;
|
||||
sha256 = sourceInfo.sha256;
|
||||
};
|
||||
|
||||
inherit (sourceInfo) name version;
|
||||
stdenv.mkDerivation {
|
||||
inherit (s) 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@"
|
||||
mkdir -p "$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 ''
|
||||
mkdir -p "$out/share/angelscript"
|
||||
cp -r ../../../docs "$out/share/angelscript"
|
||||
'' ["defEnsureDir" "prepareBuild"];
|
||||
|
||||
meta = {
|
||||
description = "Light-weight scripting library";
|
||||
maintainers = with a.lib.maintainers;
|
||||
[
|
||||
raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
linux;
|
||||
license = a.lib.licenses.zlib;
|
||||
homepage="http://www.angelcode.com/angelscript/";
|
||||
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
inherit (s) url sha256;
|
||||
};
|
||||
}) x
|
||||
|
||||
preConfigure = ''
|
||||
cd angelscript/projects/gnuc
|
||||
export makeFlags="$makeFlags PREFIX=$out"
|
||||
'';
|
||||
postInstall = ''
|
||||
mkdir -p "$out/share/docs/angelscript"
|
||||
cp -r ../../../docs/* "$out/share/docs/angelscript"
|
||||
'';
|
||||
meta = {
|
||||
inherit (s) version;
|
||||
description = "Light-weight scripting library";
|
||||
license = stdenv.lib.licenses.zlib ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
|
||||
homepage="http://www.angelcode.com/angelscript/";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue