nixpkgs/pkgs/development/python-modules/nbexec/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
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
2026-01-11 09:34:20 -08:00

65 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build inputs
jupyter-client,
nbformat,
nbconvert,
setuptools,
# check inputs
unittestCheckHook,
ipykernel,
}:
let
pname = "nbexec";
version = "0.2.0";
in
buildPythonPackage {
inherit pname version;
pyproject = true;
src = fetchFromGitHub {
owner = "jsvine";
repo = "nbexec";
tag = "v${version}";
hash = "sha256-Vv6EHX6WlnSmzQAYlO1mHnz5t078z3RQfVfte1+X2pw=";
};
build-system = [ setuptools ];
dependencies = [
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" ];
__darwinAllowLocalNetworking = true;
meta = {
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 = lib.licenses.mit;
maintainers = with lib.maintainers; [ happysalada ];
};
}