nixpkgs/pkgs/development/python-modules/msgspec/default.nix
Martin Weinelt b79da2786f Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/bundlewrap/default.nix
	pkgs/development/python-modules/coverage/default.nix
	pkgs/development/python-modules/h5netcdf/default.nix
	pkgs/development/python-modules/hypothesis/default.nix
	pkgs/development/python-modules/numba/default.nix
	pkgs/development/python-modules/optype/default.nix
	pkgs/development/python-modules/setuptools-git-versioning/default.nix
	pkgs/development/python-modules/sphinx/default.nix
2026-02-15 16:17:41 +01:00

83 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
attrs,
coverage,
furo,
ipython,
msgpack,
mypy,
pre-commit,
pyright,
pytest,
pyyaml,
setuptools,
setuptools-scm,
sphinx,
sphinx-copybutton,
sphinx-design,
tomli-w,
}:
buildPythonPackage rec {
pname = "msgspec";
version = "0.20.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-DWDmnSuo12oXl9NVfNhIOtWrQeJ9DMmHxOyHY33Datk=";
};
build-system = [
setuptools
setuptools-scm
];
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 ];
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/${src.tag}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
}