mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-16 00:59:38 +00:00
Add `pyprojectVersionPatchHook` to patch the incorrect version in `pyproject.toml` in order to make `pythonMetadataCheckPhase` pass. Hydra: https://hydra.nixos.org/build/347236462
65 lines
1.1 KiB
Nix
65 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
ninja,
|
|
scikit-build-core,
|
|
|
|
# nativeBuildInputs
|
|
cmake,
|
|
pyprojectVersionPatchHook,
|
|
|
|
# dependencies
|
|
torch,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
scipy,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "deepwave";
|
|
version = "0.0.27";
|
|
pyproject = true;
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ar4";
|
|
repo = "deepwave";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-zOyoycCJjx4HJEnkAD5r7d+qxO5A+d0dCgx2oRjxPuU=";
|
|
};
|
|
|
|
build-system = [
|
|
ninja
|
|
scikit-build-core
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pyprojectVersionPatchHook
|
|
];
|
|
dontUseCmakeConfigure = true;
|
|
|
|
dependencies = [
|
|
torch
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
scipy
|
|
];
|
|
|
|
pythonImportsCheck = [ "deepwave" ];
|
|
|
|
meta = {
|
|
description = "Wave propagation modules for PyTorch";
|
|
homepage = "https://github.com/ar4/deepwave";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.intersectLists lib.platforms.x86_64 lib.platforms.linux;
|
|
maintainers = [ ];
|
|
};
|
|
})
|