Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.4 kB · 65 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566{ lib, buildPythonPackage, fetchFromGitHub, fetchNpmDeps, pythonOlder, nodejs, npmHooks, hatchling, hatch-vcs, anywidget, pytestCheckHook,}:
buildPythonPackage rec { pname = "ipyniivue"; version = "2.4.0"; pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub { owner = "niivue"; repo = "ipyniivue"; tag = "v${version}"; hash = "sha256-APxxYflEYcjQGloLvdOGMlOnOL/0ttGVvTCLEMqp1W0="; };
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/${src.tag}"; license = licenses.bsd3; maintainers = with maintainers; [ bcdarwin ]; };}