1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "msgspec";
11 version = "0.19.0";
12 pyproject = true;
13
14 disabled = pythonOlder "3.8";
15
16 src = fetchFromGitHub {
17 owner = "jcrist";
18 repo = "msgspec";
19 tag = version;
20 # Note that this hash changes after some time after release because they
21 # use `$Format:%d$` in msgspec/_version.py, and GitHub produces different
22 # tarballs depending on whether tagged commit is the last commit, see
23 # https://github.com/NixOS/nixpkgs/issues/84312
24 hash = "sha256-CajdPNAkssriY/sie5gR+4k31b3Wd7WzqcsFmrlSoPY=";
25 };
26
27 build-system = [ setuptools ];
28
29 # Requires libasan to be accessible
30 doCheck = false;
31
32 pythonImportsCheck = [ "msgspec" ];
33
34 meta = with lib; {
35 description = "Module to handle JSON/MessagePack";
36 homepage = "https://github.com/jcrist/msgspec";
37 changelog = "https://github.com/jcrist/msgspec/releases/tag/${version}";
38 license = licenses.bsd3;
39 maintainers = with maintainers; [ fab ];
40 };
41}