2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, django
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
, ua-parser
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-sesame";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "3.1";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aaugustin";
|
|
|
|
repo = pname;
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-Pyyhm0th0cNEkM0sd6maCnf4qELsSO82c9CQuqQdn0w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
django
|
|
|
|
ua-parser
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ elohmeier ];
|
|
|
|
};
|
|
|
|
}
|