Merge pull request #257655 from mbalatsko/init-walrus

python3Packages.walrus: init at 0.9.3
This commit is contained in:
Fabian Affolter 2023-10-01 16:04:36 +02:00 committed by GitHub
commit 4b675b5c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,52 @@
{ lib
, pkgs
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, redis
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "walrus";
version = "0.9.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "coleifer";
repo = "walrus";
rev = "refs/tags/${version}";
hash = "sha256-jinYMGSBAY8HTg92qU/iU5vGIrrDr5SeQG0XjsBVfcc=";
};
propagatedBuildInputs = [
redis
];
nativeCheckInputs = [
unittestCheckHook
];
preCheck = ''
${pkgs.redis}/bin/redis-server &
REDIS_PID=$!
'';
postCheck = ''
kill $REDIS_PID
'';
pythonImportsCheck = [
"walrus"
];
meta = with lib; {
description = "Lightweight Python utilities for working with Redis";
homepage = "https://github.com/coleifer/walrus";
changelog = "https://github.com/coleifer/walrus/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ mbalatsko ];
};
}

View File

@ -13860,6 +13860,8 @@ self: super: with self; {
wallbox = callPackage ../development/python-modules/wallbox { };
walrus = callPackage ../development/python-modules/walrus { };
wand = callPackage ../development/python-modules/wand { };
wandb = callPackage ../development/python-modules/wandb { };