mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 09:04:16 +01:00
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
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
poetry-core,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "nats-python";
|
|
version = "0.8.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Gr1N";
|
|
repo = "nats-python";
|
|
tag = version;
|
|
hash = "sha256-7/AGQfPEuSeoRGUXeyDZNbLhapfQa7vhrSPHRruf+sg=";
|
|
};
|
|
|
|
patches = [
|
|
# Switch to poetry-core, https://github.com/Gr1N/nats-python/pull/19
|
|
(fetchpatch {
|
|
name = "use-poetry-core.patch";
|
|
url = "https://github.com/Gr1N/nats-python/commit/71b25b324212dccd7fc06ba3914491adba22e83f.patch";
|
|
hash = "sha256-9AUd/anWCAhuD0VdxRm6Ydlst8nttjwfPmqK+S8ON7o=";
|
|
})
|
|
];
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [ setuptools ];
|
|
|
|
# Tests require a running NATS server
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "pynats" ];
|
|
|
|
meta = {
|
|
description = "Python client for NATS messaging system";
|
|
homepage = "https://github.com/Gr1N/nats-python";
|
|
changelog = "https://github.com/Gr1N/nats-python/releases/tag/${version}";
|
|
license = with lib.licenses; [ mit ];
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|