Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
74 lines
1.5 KiB
Nix
74 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.2.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jazzband";
|
|
repo = "django-auditlog";
|
|
tag = "v${version}";
|
|
hash = "sha256-159p82PT3za3wp2XhekGxy+NYxLyQfAyUOyhDjyr2CI=";
|
|
};
|
|
|
|
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
|
|
|
|
cd auditlog_tests
|
|
# 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} ./manage.py test | cat
|
|
cd ..
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
pythonImportsCheck = [ "auditlog" ];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/jazzband/django-auditlog/blob/${src.tag}/CHANGELOG.md";
|
|
description = "Django app that keeps a log of changes made to an object";
|
|
downloadPage = "https://github.com/jazzband/django-auditlog";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ leona ];
|
|
};
|
|
}
|