My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/casbin/default.nix

47 lines
899 B

{ lib
, buildPythonPackage
, fetchFromGitHub
, simpleeval
, pythonOlder
, coveralls
, wcmatch
}:
buildPythonPackage rec {
pname = "casbin";
version = "1.16.4";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = pname;
repo = "pycasbin";
rev = "refs/tags/v${version}";
sha256 = "sha256-/zIx1GlzAnQf0t2d8ME+bi2CZGj6Qr9f5Z4afrQD8FY=";
};
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 ];
};
}