2018-02-24 13:12:44 +00:00
|
|
|
{stdenv, fetchFromGitHub, SDL, libGLU_combined, rebar, erlang, opencl-headers, ocl-icd }:
|
2016-03-29 11:23:12 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-03-12 02:59:11 +00:00
|
|
|
version = "1.2.3";
|
2016-03-29 11:23:12 +01:00
|
|
|
name = "cl-${version}";
|
|
|
|
|
2017-03-12 02:59:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tonyrog";
|
|
|
|
repo = "cl";
|
|
|
|
rev = "cl-${version}";
|
|
|
|
sha256 = "1dk0k03z0ipxvrnn0kihph135hriw96jpnd31lbq44k6ckh6bm03";
|
2016-03-29 11:23:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ erlang rebar opencl-headers ocl-icd ];
|
2017-03-12 02:59:11 +00:00
|
|
|
|
2016-03-29 11:23:12 +01:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2017-03-12 02:59:11 +00:00
|
|
|
meta = with stdenv.lib; {
|
2016-03-29 11:23:12 +01:00
|
|
|
homepage = https://github.com/tonyrog/cl;
|
|
|
|
description = "OpenCL binding for Erlang";
|
2017-03-12 02:59:11 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2016-03-29 11:23:12 +01:00
|
|
|
};
|
|
|
|
}
|