nixpkgs/pkgs/development/python-modules/tbm-utils/default.nix

40 lines
896 B
Nix
Raw Normal View History

2019-10-27 14:53:49 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, attrs
, pendulum
, pprintpp
, wrapt
, pythonOlder
}:
buildPythonPackage rec {
pname = "tbm-utils";
2020-06-06 07:47:33 +01:00
version = "2.6.0";
disabled = pythonOlder "3.6";
2019-10-27 14:53:49 +00:00
src = fetchPypi {
inherit pname version;
2020-06-06 07:47:33 +01:00
sha256 = "235748cceeb22c042e32d2fdfd4d710021bac9b938c4f2c35e1fce1cfd58f7ec";
2019-10-27 14:53:49 +00:00
};
propagatedBuildInputs = [ attrs pendulum pprintpp wrapt ];
2019-10-27 14:53:49 +00:00
2020-06-26 02:25:29 +01:00
# this versioning was done to prevent normal pip users from encountering
# issues with package failing to build from source, but nixpkgs is better
postPatch = ''
substituteInPlace setup.py \
--replace "pendulum>=2.0,<=3.0,!=2.0.5,!=2.1.0" "pendulum>=2.0,<=3.0"
'';
2019-10-27 14:53:49 +00:00
# No tests in archive.
doCheck = false;
meta = {
description = "A commonly-used set of utilities";
homepage = "https://github.com/thebigmunch/tbm-utils";
license = with lib.licenses; [ mit ];
2019-10-27 14:53:49 +00:00
};
}