nixpkgs/pkgs/development/libraries/cl/default.nix

37 lines
947 B
Nix
Raw Normal View History

{stdenv, fetchFromGitHub, rebar, erlang, opencl-headers, ocl-icd }:
stdenv.mkDerivation rec {
version = "1.2.4";
pname = "cl";
2017-03-12 02:59:11 +00:00
src = fetchFromGitHub {
owner = "tonyrog";
repo = "cl";
rev = "cl-${version}";
sha256 = "1gwkjl305a0231hz3k0w448dsgbgdriaq764sizs5qfn59nzvinz";
};
buildInputs = [ erlang rebar opencl-headers ocl-icd ];
2019-12-23 10:17:53 +00: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/${pname}-${version}
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; {
homepage = https://github.com/tonyrog/cl;
description = "OpenCL binding for Erlang";
2017-03-12 02:59:11 +00:00
license = licenses.mit;
2019-12-23 10:17:53 +00:00
# https://github.com/tonyrog/cl/issues/39
broken = stdenv.isAarch64;
2017-03-12 02:59:11 +00:00
platforms = platforms.linux;
};
}