Files
nixpkgs/pkgs/development/python-modules/nbexec/default.nix
T
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

64 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
# build inputs
jupyter-client,
nbformat,
nbconvert,
# check inputs
unittestCheckHook,
ipykernel,
}:
let
pname = "nbexec";
version = "0.2.0";
in
buildPythonPackage {
inherit pname version;
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "jsvine";
repo = "nbexec";
rev = "refs/tags/v${version}";
hash = "sha256-Vv6EHX6WlnSmzQAYlO1mHnz5t078z3RQfVfte1+X2pw=";
};
propagatedBuildInputs = [
jupyter-client
nbformat
nbconvert
];
# TODO there is a warning about debugpy_stream missing
nativeCheckInputs = [
unittestCheckHook
ipykernel
];
preCheck = ''
export HOME=$(mktemp -d)
'';
unittestFlagsArray = [
"-s"
"test"
"-v"
];
pythonImportsCheck = [ "nbexec" ];
meta = with lib; {
description = "Dead-simple tool for executing Jupyter notebooks from the command line";
mainProgram = "nbexec";
homepage = "https://github.com/jsvine/nbexec";
changelog = "https://github.com/jsvine/nbexec/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
};
}