depot/third_party/nixpkgs/pkgs/development/python-modules/ircrobots/default.nix
Default email 75ca762b89 Project import generated by Copybara.
GitOrigin-RevId: 29b0d4d0b600f8f5dd0b86e3362a33d4181938f9
2021-03-09 11:18:52 +08:00

53 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, anyio
, asyncio-throttle
, dataclasses
, ircstates
, async_stagger
, async-timeout
, python
}:
buildPythonPackage rec {
pname = "ircrobots";
version = "0.3.7";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "jesopo";
repo = pname;
rev = "v${version}";
sha256 = "0cm4hcmprca24d979ydbzwn9mfxw16jki6ld7yykxryf0983nqc7";
};
postPatch = ''
# too specific pins https://github.com/jesopo/ircrobots/issues/3
sed -iE 's/anyio.*/anyio/' requirements.txt
'';
propagatedBuildInputs = [
anyio
asyncio-throttle
ircstates
async_stagger
async-timeout
] ++ lib.optionals (pythonOlder "3.7") [
dataclasses
];
checkPhase = ''
${python.interpreter} -m unittest test
'';
pythonImportsCheck = [ "ircrobots" ];
meta = with lib; {
description = "Asynchronous bare-bones IRC bot framework for python3";
license = licenses.mit;
homepage = "https://github.com/jesopo/ircrobots";
maintainers = with maintainers; [ hexa ];
};
}