Merge pull request #16237 from jb55/terra-update-master

terra: 2016-01-06 -> 2016-06-09
This commit is contained in:
Joachim Fasting 2016-06-17 16:23:19 +02:00 committed by GitHub
commit 8e3a674305
2 changed files with 32 additions and 18 deletions

View File

@ -1,37 +1,52 @@
{ stdenv, lua, fetchFromGitHub, fetchurl, which, llvm, clang, ncurses }:
{ stdenv, fetchFromGitHub, fetchurl, which, llvmPackages, ncurses, lua }:
let luajitArchive = "LuaJIT-2.0.4.tar.gz";
luajitSrc = fetchurl {
url = "http://luajit.org/download/${luajitArchive}";
sha256 = "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2";
};
in stdenv.mkDerivation rec {
let
luajitArchive = "LuaJIT-2.0.4.tar.gz";
luajitSrc = fetchurl {
url = "http://luajit.org/download/${luajitArchive}";
sha256 = "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2";
};
in
stdenv.mkDerivation rec {
name = "terra-git-${version}";
version = "2016-01-06";
version = "2016-06-09";
src = fetchFromGitHub {
owner = "zdevito";
repo = "terra";
rev = "914cb98b8adcd50b2ec8205ef5d6914d3547e281";
sha256 = "1q0dm9gkx2lh2d2sfgly6j5nw32qigmlj3phdvjp26bz99cvxq46";
rev = "22696f178be8597af555a296db804dba820638ba";
sha256 = "1c2i9ih331304bh31c5gh94fx0qa49rsn70pvczvdfhi8pmcms6g";
};
patchPhase = ''
outputs = [ "dev" "out" "bin" "static" ];
postPatch = ''
substituteInPlace Makefile --replace \
'-lcurses' '-lncurses'
'';
configurePhase = ''
preBuild = ''
mkdir -p build
cp ${luajitSrc} build/${luajitArchive}
'';
installPhase = ''
mkdir -p $out
cp -r "release/"* $out
'';
mkdir -pv $out/lib
cp -v release/lib/terra.so $out/lib
buildInputs = [ which lua llvm clang ncurses ];
mkdir -pv $bin/bin
cp -v release/bin/terra $bin/bin
mkdir -pv $static/lib
cp -v release/lib/libterra.a $static/lib
mkdir -pv $dev/include
cp -rv release/include/terra $dev/include
''
;
buildInputs = with llvmPackages; [ which lua llvm clang-unwrapped ncurses ];
meta = with stdenv.lib; {
inherit (src.meta) homepage;

View File

@ -5361,8 +5361,7 @@ in
tbb = callPackage ../development/libraries/tbb { };
terra = callPackage ../development/compilers/terra {
llvm = llvmPackages_35.llvm.override { enableSharedLibraries = false; };
clang = clang_35;
llvmPackages = llvmPackages_38;
lua = lua5_1;
};