at 18.03-beta 34 lines 892 B view raw
1{stdenv, fetchFromGitHub, SDL, libGLU_combined, rebar, erlang, opencl-headers, ocl-icd }: 2 3stdenv.mkDerivation rec { 4 version = "1.2.3"; 5 name = "cl-${version}"; 6 7 src = fetchFromGitHub { 8 owner = "tonyrog"; 9 repo = "cl"; 10 rev = "cl-${version}"; 11 sha256 = "1dk0k03z0ipxvrnn0kihph135hriw96jpnd31lbq44k6ckh6bm03"; 12 }; 13 14 buildInputs = [ erlang rebar opencl-headers ocl-icd ]; 15 16 buildPhase = '' 17 rebar compile 18 ''; 19 20 # 'cp' line taken from Arch recipe 21 # https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/erlang-sdl 22 installPhase = '' 23 DIR=$out/lib/erlang/lib/${name} 24 mkdir -p $DIR 25 cp -ruv c_src doc ebin include priv src $DIR 26 ''; 27 28 meta = with stdenv.lib; { 29 homepage = https://github.com/tonyrog/cl; 30 description = "OpenCL binding for Erlang"; 31 license = licenses.mit; 32 platforms = platforms.linux; 33 }; 34}