nixpkgs/pkgs/development/python-modules/casbin/default.nix
2020-12-15 23:05:15 -08:00

41 lines
777 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, simpleeval
, isPy27
, coveralls
}:
buildPythonPackage rec {
pname = "casbin";
version = "0.13.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = pname;
repo = "pycasbin";
rev = "v${version}";
sha256 = "1im5j3wsjh916v2mp1bfi53m6k6w9s3sr5ja4anrz4b9izc65m0j";
};
propagatedBuildInputs = [
simpleeval
];
checkInputs = [
coveralls
];
checkPhase = ''
coverage run -m unittest discover -s tests -t tests
'';
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 = [ maintainers.costrouc ];
};
}