mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
0215034f25
when they already rely on SRI hashes.
48 lines
911 B
Nix
48 lines
911 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, django
|
|
, freezegun
|
|
, pythonOlder
|
|
, qrcode
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-otp";
|
|
version = "1.1.3";
|
|
disabled = pythonOlder "3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "django-otp";
|
|
repo = "django-otp";
|
|
rev = "v${version}";
|
|
hash = "sha256-Ac9p7q9yaUr3WTTGxCY16Yo/Z8i1RtnD2g0Aj2pqSXY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs manage.py
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
django
|
|
qrcode
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
freezegun
|
|
];
|
|
|
|
checkPhase = ''
|
|
./manage.py test django_otp
|
|
'';
|
|
|
|
pythonImportsCheck = [ "django_otp" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/jazzband/django-model-utils";
|
|
description = "Pluggable framework for adding two-factor authentication to Django using one-time passwords";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
};
|
|
}
|