Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / nats-python / default.nix
blob9662dddd5ddbb7f82d204ab8da77486e7bbc3537
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , poetry-core
6 , pythonOlder
7 , setuptools
8 }:
10 buildPythonPackage rec {
11   pname = "nats-python";
12   version = "0.8.0";
13   disabled = pythonOlder "3.6";
14   format = "pyproject";
16   src = fetchFromGitHub {
17     owner = "Gr1N";
18     repo = "nats-python";
19     rev = version;
20     sha256 = "1j7skyxldir3mphvnsyhjxmf3cimv4h7n5v58jl2gff4yd0hdw7g";
21   };
23   nativeBuildInputs = [
24     poetry-core
25   ];
27   patches = [
28     # Switch to poetry-core, https://github.com/Gr1N/nats-python/pull/19
29     (fetchpatch {
30       name = "use-poetry-core.patch";
31       url = "https://github.com/Gr1N/nats-python/commit/71b25b324212dccd7fc06ba3914491adba22e83f.patch";
32       sha256 = "1fip1qpzk2ka7qgkrdpdr6vnrnb1p8cwapa51xp0h26nm7yis1gl";
33     })
34   ];
36   propagatedBuildInputs = [
37     setuptools
38   ];
40   # Tests require a running NATS server
41   doCheck = false;
43   pythonImportsCheck = [ "pynats" ];
45   meta = with lib; {
46     description = "Python client for NATS messaging system";
47     homepage = "https://github.com/Gr1N/nats-python";
48     license = with licenses; [ mit ];
49     maintainers = with maintainers; [ fab ];
50   };