3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/casbin/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
899 B
Nix
Raw Normal View History

2019-12-16 18:24:22 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, simpleeval
2021-11-18 22:01:32 +00:00
, pythonOlder
2019-12-16 18:24:22 +00:00
, coveralls
, wcmatch
2019-12-16 18:24:22 +00:00
}:
buildPythonPackage rec {
pname = "casbin";
version = "1.16.5";
2021-11-18 22:01:32 +00:00
format = "setuptools";
2019-12-16 18:24:22 +00:00
2021-11-18 22:01:32 +00:00
disabled = pythonOlder "3.6";
2019-12-16 18:24:22 +00:00
src = fetchFromGitHub {
owner = pname;
repo = "pycasbin";
rev = "refs/tags/v${version}";
sha256 = "sha256-27j1iuqf0af4Cm3r32FJnWnjvvUcacuv2+1OL6z/mwM=";
2019-12-16 18:24:22 +00:00
};
propagatedBuildInputs = [
simpleeval
wcmatch
2019-12-16 18:24:22 +00:00
];
checkInputs = [
coveralls
];
checkPhase = ''
coverage run -m unittest discover -s tests -t tests
'';
pythonImportsCheck = [
"casbin"
];
2019-12-16 18:24:22 +00:00
meta = with lib; {
description = "An authorization library that supports access control models like ACL, RBAC, ABAC in Python";
homepage = "https://github.com/casbin/pycasbin";
2019-12-16 18:24:22 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ costrouc ];
2019-12-16 18:24:22 +00:00
};
}