Files
nixpkgs/pkgs/development/python-modules/celery-singleton/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

71 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchpatch,
fetchFromGitHub,
poetry-core,
celery,
redis,
pytestCheckHook,
pytest-celery,
pytest-cov-stub,
}:
buildPythonPackage rec {
pname = "celery-singleton";
version = "0.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "steinitzu";
repo = "celery-singleton";
rev = version;
hash = "sha256-fHlakxxjYIADELZdxIj6rvsZ/+1QfnKvAg3w5cdzvDc=";
};
patches = [
# chore(poetry): use poetry-core
# https://github.com/steinitzu/celery-singleton/pull/54
(fetchpatch {
name = "use-poetry-core.patch";
url = "https://github.com/steinitzu/celery-singleton/pull/54/commits/634a001c92a1dff1fae513fc95d733ea9b87e4cf.patch";
hash = "sha256-lXN4khwyL96pWyBS+iuSkGEkegv4HxYtym+6JUcPa94=";
})
];
build-system = [ poetry-core ];
dependencies = [
celery
redis
];
checkInputs = [
pytestCheckHook
pytest-celery
pytest-cov-stub
];
pytestFlagsArray = [ "tests" ];
# Tests require a running Redis backend
disabledTests = [
"TestLock"
"TestUnlock"
"TestClear"
"TestSimpleTask"
"TestRaiseOnDuplicateConfig"
"TestUniqueOn"
];
pythonImportsCheck = [ "celery_singleton" ];
meta = with lib; {
description = "Seamlessly prevent duplicate executions of celery tasks";
homepage = "https://github.com/steinitzu/celery-singleton";
changelog = "https://github.com/steinitzu/celery-singleton/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}