Files
nixpkgs/pkgs/development/python-modules/msgspec/default.nix
T
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

85 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
attrs,
coverage,
furo,
ipython,
msgpack,
mypy,
pre-commit,
pyright,
pytest,
pyyaml,
setuptools,
sphinx,
sphinx-copybutton,
sphinx-design,
tomli,
tomli-w,
}:
buildPythonPackage rec {
pname = "msgspec";
version = "0.19.0";
pyproject = true;
src = fetchFromGitHub {
owner = "jcrist";
repo = "msgspec";
tag = version;
# Note that this hash changes after some time after release because they
# use `$Format:%d$` in msgspec/_version.py, and GitHub produces different
# tarballs depending on whether tagged commit is the last commit, see
# https://github.com/NixOS/nixpkgs/issues/84312
hash = "sha256-CajdPNAkssriY/sie5gR+4k31b3Wd7WzqcsFmrlSoPY=";
};
build-system = [ setuptools ];
optional-dependencies = {
dev = [
coverage
mypy
pre-commit
pyright
]
++ optional-dependencies.doc
++ optional-dependencies.test;
doc = [
furo
ipython
sphinx
sphinx-copybutton
sphinx-design
];
test = [
attrs
msgpack
pytest
]
++ optional-dependencies.yaml
++ optional-dependencies.toml;
toml = [
tomli-w
]
++ lib.optional (pythonOlder "3.11") tomli;
yaml = [ pyyaml ];
};
# Requires libasan to be accessible
doCheck = false;
pythonImportsCheck = [ "msgspec" ];
meta = {
description = "Module to handle JSON/MessagePack";
homepage = "https://github.com/jcrist/msgspec";
changelog = "https://github.com/jcrist/msgspec/releases/tag/${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
}