diff --git a/pkgs/by-name/cl/clpeak/package.nix b/pkgs/by-name/cl/clpeak/package.nix index bf8285ca8969..05630a9bb0f3 100644 --- a/pkgs/by-name/cl/clpeak/package.nix +++ b/pkgs/by-name/cl/clpeak/package.nix @@ -7,26 +7,18 @@ opencl-clhpp, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "clpeak"; - version = "1.1.0"; + version = "1.1.4"; src = fetchFromGitHub { owner = "krrishnarraj"; repo = "clpeak"; - rev = version; + tag = finalAttrs.version; fetchSubmodules = true; - sha256 = "1wkjpvn4r89c3y06rv7gfpwpqw6ljmqwz0w0mljl9y5hn1r4pkx2"; + hash = "sha256-unQLZ5EExL9lU2XuYLJjASeFzDA74+TnU0CQTWyNYiQ="; }; - patches = [ - # The cl.hpp header was removed from opencl-clhpp. This patch - # updates clpeak to use the new cp2.hpp header. The patch comes - # from the following PR and was updated to apply against more - # recent versions: https://github.com/krrishnarraj/clpeak/pull/46 - ./clpeak-clhpp2.diff - ]; - nativeBuildInputs = [ cmake ]; buildInputs = [ @@ -34,11 +26,11 @@ stdenv.mkDerivation rec { opencl-clhpp ]; - meta = with lib; { + meta = { description = "Tool which profiles OpenCL devices to find their peak capacities"; homepage = "https://github.com/krrishnarraj/clpeak/"; - license = licenses.unlicense; - maintainers = [ ]; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.xokdvium ]; mainProgram = "clpeak"; }; -} +}) diff --git a/pkgs/by-name/op/opencl-clhpp/package.nix b/pkgs/by-name/op/opencl-clhpp/package.nix index 241c80190e18..5a545fccc4da 100644 --- a/pkgs/by-name/op/opencl-clhpp/package.nix +++ b/pkgs/by-name/op/opencl-clhpp/package.nix @@ -4,18 +4,22 @@ fetchFromGitHub, cmake, python3, + ruby, opencl-headers, + khronos-ocl-icd-loader, + testers, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "opencl-clhpp"; - version = "2024.05.08"; + version = "2024.10.24"; src = fetchFromGitHub { owner = "KhronosGroup"; repo = "OpenCL-CLHPP"; - rev = "v${version}"; - sha256 = "sha256-bIm4tGqwWX0IPKH3BwLgkf0T7YFrkN6vemYvdPrqUpw="; + rev = "v${finalAttrs.version}"; + fetchSubmodules = true; + sha256 = "sha256-3RVZJIt03pRmjrPa9q6h6uqFCuTnxvEqjUGUmdwybbY="; }; nativeBuildInputs = [ @@ -27,15 +31,28 @@ stdenv.mkDerivation rec { strictDeps = true; + doCheck = true; + checkInputs = [ khronos-ocl-icd-loader ]; + nativeCheckInputs = [ ruby ]; + cmakeFlags = [ - "-DBUILD_EXAMPLES=OFF" - "-DBUILD_TESTS=OFF" + (lib.cmakeBool "OPENCL_CLHPP_BUILD_TESTING" finalAttrs.finalPackage.doCheck) + (lib.cmakeBool "BUILD_EXAMPLES" finalAttrs.finalPackage.doCheck) ]; - meta = with lib; { + passthru.tests = { + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + moduleNames = [ "OpenCL-CLHPP" ]; + # Package version does not match the pkg-config module version. + }; + }; + + meta = { description = "OpenCL Host API C++ bindings"; homepage = "http://github.khronos.org/OpenCL-CLHPP/"; - license = licenses.mit; - platforms = platforms.unix; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.xokdvium ]; + platforms = lib.platforms.unix; }; -} +}) diff --git a/pkgs/by-name/op/opencl-headers/package.nix b/pkgs/by-name/op/opencl-headers/package.nix index 94e8e4b0ffbe..b0bfde105a11 100644 --- a/pkgs/by-name/op/opencl-headers/package.nix +++ b/pkgs/by-name/op/opencl-headers/package.nix @@ -7,6 +7,7 @@ ocl-icd, tesseract, testers, + opencl-clhpp, }: stdenv.mkDerivation (finalAttrs: { @@ -23,18 +24,23 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake ]; passthru.tests = { - inherit ocl-icd tesseract hashcat; + inherit + ocl-icd + tesseract + hashcat + opencl-clhpp + ; pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; moduleNames = [ "OpenCL-Headers" ]; }; }; - meta = with lib; { + meta = { description = "Khronos OpenCL headers version ${finalAttrs.version}"; homepage = "https://www.khronos.org/registry/cl/"; - license = licenses.asl20; - platforms = platforms.unix ++ platforms.windows; - maintainers = [ ]; + license = lib.licenses.asl20; + platforms = lib.platforms.unix ++ lib.platforms.windows; + maintainers = [ lib.maintainers.xokdvium ]; }; })