mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
79de2381ec
Diff: https://github.com/coleifer/walrus/compare/refs/tags/0.9.3...0.9.4 Changelog: https://github.com/coleifer/walrus/blob/0.9.4/CHANGELOG.md
53 lines
1.0 KiB
Nix
53 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pkgs,
|
|
pythonOlder,
|
|
redis,
|
|
setuptools,
|
|
unittestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "walrus";
|
|
version = "0.9.4";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "coleifer";
|
|
repo = "walrus";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-cvoRiaGGTpZWfSE6DDT6GwDmc/TC/Z/E76Qy9Zzkpsw=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ redis ];
|
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
|
|
|
preCheck = ''
|
|
${pkgs.redis}/bin/redis-server &
|
|
REDIS_PID=$!
|
|
'';
|
|
|
|
postCheck = ''
|
|
kill $REDIS_PID
|
|
'';
|
|
|
|
pythonImportsCheck = [ "walrus" ];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
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 ];
|
|
};
|
|
}
|