2018-07-20 17:44:44 -07:00
|
|
|
{stdenv, fetchFromGitHub, rebar, erlang, opencl-headers, ocl-icd }:
|
2016-03-29 03:23:12 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-10-03 12:33:14 -07:00
|
|
|
version = "1.2.4";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "cl";
|
2016-03-29 03:23:12 -07:00
|
|
|
|
2017-03-11 18:59:11 -08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tonyrog";
|
|
|
|
repo = "cl";
|
|
|
|
rev = "cl-${version}";
|
2018-10-03 12:33:14 -07:00
|
|
|
sha256 = "1gwkjl305a0231hz3k0w448dsgbgdriaq764sizs5qfn59nzvinz";
|
2016-03-29 03:23:12 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ erlang rebar opencl-headers ocl-icd ];
|
2019-12-23 02:17:53 -08:00
|
|
|
|
2016-03-29 03:23:12 -07: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 = ''
|
2019-08-15 05:41:18 -07:00
|
|
|
DIR=$out/lib/erlang/lib/${pname}-${version}
|
2016-03-29 03:23:12 -07:00
|
|
|
mkdir -p $DIR
|
|
|
|
cp -ruv c_src doc ebin include priv src $DIR
|
|
|
|
'';
|
|
|
|
|
2017-03-11 18:59:11 -08:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/tonyrog/cl";
|
2016-03-29 03:23:12 -07:00
|
|
|
description = "OpenCL binding for Erlang";
|
2017-03-11 18:59:11 -08:00
|
|
|
license = licenses.mit;
|
2019-12-23 02:17:53 -08:00
|
|
|
# https://github.com/tonyrog/cl/issues/39
|
|
|
|
broken = stdenv.isAarch64;
|
2017-03-11 18:59:11 -08:00
|
|
|
platforms = platforms.linux;
|
2016-03-29 03:23:12 -07:00
|
|
|
};
|
|
|
|
}
|