Files
nixpkgs/pkgs/by-name/cl/clblas/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

74 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
gfortran,
blas,
boost,
python3,
ocl-icd,
opencl-headers,
}:
stdenv.mkDerivation rec {
pname = "clblas";
version = "2.12";
src = fetchFromGitHub {
owner = "clMathLibraries";
repo = "clBLAS";
rev = "v${version}";
sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs";
};
patches = [
./platform.patch
(fetchpatch {
url = "https://github.com/clMathLibraries/clBLAS/commit/68ce5f0b824d7cf9d71b09bb235cf219defcc7b4.patch";
hash = "sha256-XoVcHgJ0kTPysZbM83mUX4/lvXVHKbl7s2Q8WWiUnMs=";
})
];
postPatch = ''
sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt
'';
preConfigure = ''
cd src
'';
cmakeFlags = [
"-DBUILD_TEST=OFF"
];
nativeBuildInputs = [
cmake
gfortran
python3
];
buildInputs = [
blas
boost
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
ocl-icd
opencl-headers
];
strictDeps = true;
meta = with lib; {
homepage = "https://github.com/clMathLibraries/clBLAS";
description = "Software library containing BLAS functions written in OpenCL";
longDescription = ''
This package contains a library of BLAS functions on top of OpenCL.
'';
license = licenses.asl20;
maintainers = [ ];
platforms = platforms.unix;
};
}