Files
nixpkgs/pkgs/development/python-modules/deepwave/default.nix
Tom Hunze 8a48ad4a4d python3Packages.deepwave: fix build
Add `pyprojectVersionPatchHook` to patch the incorrect version in
`pyproject.toml` in order to make `pythonMetadataCheckPhase` pass.

Hydra: https://hydra.nixos.org/build/347236462
2026-10-10 01:20:15 +02:00

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 = [ ];
};
})