diff --git a/pkgs/development/python-modules/fastrlock/default.nix b/pkgs/development/python-modules/fastrlock/default.nix index 065150e88e2f..b66ccd155c19 100644 --- a/pkgs/development/python-modules/fastrlock/default.nix +++ b/pkgs/development/python-modules/fastrlock/default.nix @@ -1,17 +1,43 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, cython +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "fastrlock"; - version = "0.8"; + version = "0.8.1"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "9cc100ed0924b32173d7de705a82fdf1257cdf60af1952a13f64759307b40931"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "scoder"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-KYJd1wGJo+z34cY0YfsRbpC9IsQY/VJqycGpMmLmaVk="; }; + nativeBuildInputs = [ + cython + ]; + + # Todo: Check why the tests have an import error + doCheck = false; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "fastrlock" + ]; + meta = with lib; { + description = "RLock implementation for CPython"; homepage = "https://github.com/scoder/fastrlock"; - description = "A fast RLock implementation for CPython"; license = licenses.mit; maintainers = with maintainers; [ hyphon81 ]; };