Updating wings and dependencies to match erlang

I updated the erlang esdl lib, added the erlang cl lib,
added opencl-headers and ocl-icd to make wings build and run.

I have not tested its opencl part; I only added dependencies so
it builds.
This commit is contained in:
Lluís Batlle i Rossell
2016-03-29 12:23:12 +02:00
parent e69306c463
commit f6a44bea9e
6 changed files with 108 additions and 18 deletions

View File

@@ -0,0 +1,33 @@
{stdenv, fetchurl, SDL, mesa, rebar, erlang, opencl-headers, ocl-icd }:
stdenv.mkDerivation rec {
version = "1.2.1";
name = "cl-${version}";
src = fetchurl {
url = "https://github.com/tonyrog/cl/archive/${name}.tar.gz";
sha256 = "03jv280h9gqqqkm0mmkjr53srd2mzhvyy1biss77wpjrzq2z12c8";
};
buildInputs = [ erlang rebar opencl-headers ocl-icd ];
#propagatedBuildInputs = [ SDL mesa ];
buildPhase = ''
sed 's/git/"${version}"/' -i src/cl.app.src
rebar compile
'';
# 'cp' line taken from Arch recipe
# https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl
installPhase = ''
DIR=$out/lib/erlang/lib/${name}
mkdir -p $DIR
cp -ruv c_src doc ebin include priv src $DIR
'';
meta = {
homepage = https://github.com/tonyrog/cl;
description = "OpenCL binding for Erlang";
license = stdenv.lib.licences.mit;
};
}

View File

@@ -1,18 +1,26 @@
{stdenv, fetchurl, SDL, mesa, erlang}:
{stdenv, fetchurl, SDL, mesa, rebar, erlang}:
stdenv.mkDerivation rec {
name = "esdl-1.0.1";
name = "esdl-1.3.1";
src = fetchurl {
url = "mirror://sourceforge/esdl/${name}.src.tar.gz";
sha256 = "0zc7cmr44v10sb593dismdm5qc2v7sm3z9yh22g4r9g6asbg5z0n";
url = "mirror://sourceforge/esdl/${name}.src.tgz";
sha256 = "0f5ad519600qarsa2anmnaxh6b7djzx1dnwxzi4l36pxsq896y01";
};
buildInputs = [ erlang ];
buildInputs = [ erlang rebar ];
propagatedBuildInputs = [ SDL mesa ];
preBuild = ''
export makeFlags="INSTALLDIR=$out/lib/erlang/addons/${name}";
buildPhase = ''
rebar compile
'';
# 'cp' line taken from Arch recipe
# https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl
installPhase = ''
DIR=$out/lib/erlang/lib/${name}
mkdir -p $DIR
cp -ruv c_src doc ebin include priv src $DIR
'';
meta = {

View File

@@ -0,0 +1,18 @@
{stdenv, fetchurl, ruby }:
stdenv.mkDerivation rec {
name = "ocl-icd-2.2.9";
src = fetchurl {
url = "https://forge.imag.fr/frs/download.php/716/${name}.tar.gz";
sha256 = "1rgaixwnxmrq2aq4kcdvs0yx7i6krakarya9vqs7qwsv5hzc32hc";
};
buildInputs = [ ruby ];
meta = with stdenv.lib; {
description = "OpenCL ICD Loader";
homepage = https://forge.imag.fr/projects/ocl-icd/;
license = licenses.bsd2;
};
}

View File

@@ -0,0 +1,23 @@
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
name = "opencl-headers-2.1.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "OpenCL-Headers";
rev = "c1770dcc6cf1daadec1905e7393f3691c1dde200";
sha256 = "0m9fkblqja0686i2jjqiszvq3df95gp01a2674xknlmkd6525rck";
};
installPhase = ''
mkdir -p $out/include/CL
cp * $out/include/CL
'';
meta = with stdenv.lib; {
description = "Khronos OpenCL headers";
homepage = https://www.khronos.org/registry/cl/;
license = licenses.mit;
};
}