mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
48 lines
899 B
Nix
48 lines
899 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, simpleeval
|
|
, pythonOlder
|
|
, coveralls
|
|
, wcmatch
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "casbin";
|
|
version = "1.16.3";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = "pycasbin";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-7URIk76iQ1u59RM1VeqO5qqTg+0kCPtsP+2Y5CxCZ3I=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
simpleeval
|
|
wcmatch
|
|
];
|
|
|
|
checkInputs = [
|
|
coveralls
|
|
];
|
|
|
|
checkPhase = ''
|
|
coverage run -m unittest discover -s tests -t tests
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"casbin"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "An authorization library that supports access control models like ACL, RBAC, ABAC in Python";
|
|
homepage = "https://github.com/casbin/pycasbin";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ costrouc ];
|
|
};
|
|
}
|