Files
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

66 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
fetchNpmDeps,
pythonOlder,
nodejs,
npmHooks,
hatchling,
hatch-vcs,
anywidget,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "ipyniivue";
version = "2.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "niivue";
repo = "ipyniivue";
rev = "v${version}";
hash = "sha256-rgScBBJ0Jqr5REZ+YFJcKwWcV33RzJ/sn6RqTL/limo=";
};
npmDeps = fetchNpmDeps {
name = "${pname}-${version}-npm-deps";
inherit src;
hash = "sha256-3IR2d4/i/e1dRlvKN21XnadUfx2lP5SuToQJ9tMhzp4=";
};
# We do not need the build hooks, because we do not need to
# build any JS components; these are present already in the PyPI artifact.
env.HATCH_BUILD_NO_HOOKS = true;
nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
];
preBuild = ''
npm run build
'';
build-system = [
hatchling
hatch-vcs
];
dependencies = [ anywidget ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "ipyniivue" ];
meta = with lib; {
description = "Show a nifti image in a webgl 2.0 canvas within a jupyter notebook cell";
homepage = "https://github.com/niivue/ipyniivue";
changelog = "https://github.com/niivue/ipyniivue/releases/tag/${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ bcdarwin ];
};
}