opencl-clhpp: 2024.05.08 -> 2024.10.24, clpeak: 1.1.0 -> 1.1.4 and adoptions (#384056)

This commit is contained in:
Wolfgang Walther
2025-04-28 20:31:41 +00:00
committed by GitHub
3 changed files with 46 additions and 31 deletions
+8 -16
View File
@@ -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";
};
}
})
+27 -10
View File
@@ -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;
};
}
})
+11 -5
View File
@@ -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 ];
};
})