nixpkgs/pkgs/development/python-modules/click/default.nix

42 lines
898 B
Nix
Raw Normal View History

2021-06-02 20:14:33 +01:00
{ lib
, buildPythonPackage
, pythonOlder
, fetchPypi
, importlib-metadata
, locale
, pytestCheckHook
}:
2018-03-31 17:30:40 +01:00
buildPythonPackage rec {
pname = "click";
version = "8.0.3";
2018-03-31 17:30:40 +01:00
src = fetchPypi {
2020-03-31 15:43:05 +01:00
inherit pname version;
sha256 = "sha256-QQ6TKwUPXu13PEzalN51lxyJzbMVWnKggxE5p55ey1s=";
2018-03-31 17:30:40 +01:00
};
postPatch = ''
2020-03-31 15:43:05 +01:00
substituteInPlace src/click/_unicodefun.py \
--replace '"locale"' "'${locale}/bin/locale'"
'';
2021-06-02 20:14:33 +01:00
propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
checkInputs = [
pytestCheckHook
];
2018-03-31 17:30:40 +01:00
meta = with lib; {
2020-03-31 15:43:05 +01:00
homepage = "https://click.palletsprojects.com/";
2018-03-31 17:30:40 +01:00
description = "Create beautiful command line interfaces in Python";
longDescription = ''
A Python package for creating beautiful command line interfaces in a
composable way, with as little code as necessary.
'';
license = licenses.bsd3;
};
}