mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-19 12:14:10 +00:00
47 lines
848 B
Nix
47 lines
848 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, simpleeval
|
|
, isPy27
|
|
, coveralls
|
|
, wcmatch
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "casbin";
|
|
version = "1.9.1";
|
|
|
|
disabled = isPy27;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = "pycasbin";
|
|
rev = "v${version}";
|
|
sha256 = "0pwaqajwxkb8c7rnb6cvpz877azs13f1mdq33z5gp2v09fj8s2b0";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|