1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchNpmDeps,
|
|
nodejs,
|
|
npmHooks,
|
|
hatchling,
|
|
hatch-vcs,
|
|
anywidget,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "ipyniivue";
|
|
version = "2.1.0";
|
|
pyproject = true;
|
|
|
|
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 = {
|
|
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 = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ bcdarwin ];
|
|
};
|
|
}
|