2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
django,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
ua-parser,
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-sesame";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "3.2.2";
|
|
|
|
pyproject = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aaugustin";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "django-sesame";
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-8jbYhD/PfPnutJZonmdrqLIQdXiUHF12w0M9tuyyDz0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
django
|
|
|
|
ua-parser
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "sesame" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
${python.interpreter} -m django test --settings=tests.settings
|
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "URLs with authentication tokens for automatic login";
|
|
|
|
homepage = "https://github.com/aaugustin/django-sesame";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/aaugustin/django-sesame/blob/${version}/docs/changelog.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|