diff --git a/pkgs/development/tools/analysis/oclgrind/default.nix b/pkgs/development/tools/analysis/oclgrind/default.nix new file mode 100644 index 000000000000..4d1b22a72b5c --- /dev/null +++ b/pkgs/development/tools/analysis/oclgrind/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, cmake, llvmPackages, readline, python }: + +stdenv.mkDerivation rec { + pname = "oclgrind"; + version = "18.3"; # see comment in all-packages.nix + + src = fetchFromGitHub { + owner = "jrprice"; + repo = "oclgrind"; + rev = "v${version}"; + sha256 = "0s42z3dg684a0gk8qyx2h08cbh95zkrdaaj9y71rrc5bjsg8197x"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ llvmPackages.llvm llvmPackages.clang-unwrapped readline python ]; + + cmakeFlags = [ + "-DCLANG_ROOT=${llvmPackages.clang-unwrapped}" + ]; + + meta = with stdenv.lib; { + description = "An OpenCL device simulator and debugger"; + homepage = https://github.com/jrprice/oclgrind; + license = licenses.bsd3; + platforms = platforms.linux; + maintainers = with maintainers; [ athas ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a1cfa099bcae..7bb749d5aefb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23908,6 +23908,10 @@ in sndio = callPackage ../misc/sndio { }; + # Oclgrind 18.3 does not work with newer LLVMs (but HEAD does, so + # fix this after next release). + oclgrind = callPackage ../development/tools/analysis/oclgrind { llvmPackages = llvmPackages_6; }; + opkg = callPackage ../tools/package-management/opkg { }; opkg-utils = callPackage ../tools/package-management/opkg-utils { };