2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
codepy,
|
|
|
|
cgen,
|
|
|
|
colorama,
|
|
|
|
fetchFromGitHub,
|
|
|
|
genpy,
|
|
|
|
immutables,
|
|
|
|
islpy,
|
|
|
|
mako,
|
|
|
|
numpy,
|
|
|
|
pymbolic,
|
|
|
|
pyopencl,
|
|
|
|
pyrsistent,
|
|
|
|
pythonOlder,
|
|
|
|
pytools,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "loopy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2024.1";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "inducer";
|
2024-05-15 15:35:15 +00:00
|
|
|
repo = "loopy";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-mU8vXEPR88QpJpzXZlZdDhMtlwIx5YpeYhXU8Vw2T9g=";
|
|
|
|
fetchSubmodules = true; # submodule at `loopy/target/c/compyte`
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-04-27 09:35:20 +00:00
|
|
|
codepy
|
2020-04-24 23:36:52 +00:00
|
|
|
cgen
|
|
|
|
colorama
|
2022-04-27 09:35:20 +00:00
|
|
|
genpy
|
2024-05-15 15:35:15 +00:00
|
|
|
immutables
|
2022-04-27 09:35:20 +00:00
|
|
|
islpy
|
2020-04-24 23:36:52 +00:00
|
|
|
mako
|
2022-04-27 09:35:20 +00:00
|
|
|
numpy
|
|
|
|
pymbolic
|
2020-04-24 23:36:52 +00:00
|
|
|
pyopencl
|
2022-04-27 09:35:20 +00:00
|
|
|
pyrsistent
|
|
|
|
pytools
|
2024-05-15 15:35:15 +00:00
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postConfigure = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "loopy" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# pyopencl._cl.LogicError: clGetPlatformIDs failed: PLATFORM_NOT_FOUND_KHR
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Code generator for array-based code on CPUs and GPUs";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/inducer/loopy";
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ tomasajt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|