a19cd4ffb1
This reverts commit65a333600d. 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
72 lines
1.5 KiB
Nix
72 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
setuptools-scm,
|
|
django,
|
|
python-dateutil,
|
|
freezegun,
|
|
psycopg2,
|
|
postgresql,
|
|
postgresqlTestHook,
|
|
python,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-auditlog";
|
|
version = "3.0.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jazzband";
|
|
repo = "django-auditlog";
|
|
rev = "v${version}";
|
|
hash = "sha256-SJ4GJp/gVIxiLbdAj3ZS+weevqIDZCMQnW/pqc5liJU=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
django
|
|
python-dateutil
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
psycopg2
|
|
postgresql
|
|
postgresqlTestHook
|
|
];
|
|
|
|
doCheck = stdenv.hostPlatform.isLinux; # postgres fails to allocate shm on darwin
|
|
|
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
# strip escape codes otherwise tests fail
|
|
# see https://github.com/jazzband/django-auditlog/issues/644
|
|
TEST_DB_USER=$PGUSER \
|
|
TEST_DB_HOST=$PGHOST \
|
|
${python.interpreter} runtests.py | cat
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
pythonImportsCheck = [ "auditlog" ];
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/jazzband/django-auditlog/blob/v${version}/CHANGELOG.md";
|
|
description = "Django app that keeps a log of changes made to an object";
|
|
downloadPage = "https://github.com/jazzband/django-auditlog";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ leona ];
|
|
};
|
|
}
|