nixpkgs/pkgs/development/python-modules/notebook-shim/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

52 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, jupyter-server
, pytestCheckHook
, pytest-tornasync
}:
buildPythonPackage rec {
pname = "notebook-shim";
version = "0.2.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "jupyter";
repo = "notebook_shim";
rev = "refs/tags/v${version}";
sha256 = "sha256-/z4vXSBqeL2wSqJ0kFNgU0TSGUGByhxHNya8EO55+7s=";
};
nativeBuildInputs = [ hatchling ];
propagatedBuildInputs = [ jupyter-server ];
preCheck = ''
mv notebook_shim/conftest.py notebook_shim/tests
cd notebook_shim/tests
'';
# TODO: understand & possibly fix why tests fail. On github most testfiles
# have been comitted with msgs "wip" though.
doCheck = false;
nativeCheckInputs = [
pytestCheckHook
pytest-tornasync
];
pythonImportsCheck = [ "notebook_shim" ];
meta = with lib; {
description = "Switch frontends to Jupyter Server";
longDescription = ''
This project provides a way for JupyterLab and other frontends to switch
to Jupyter Server for their Python Web application backend.
'';
homepage = "https://github.com/jupyter/notebook_shim";
license = licenses.bsd3;
maintainers = with maintainers; [ friedelino ];
};
}