3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/click/default.nix

42 lines
911 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";
2021-10-09 01:59:36 +01:00
version = "8.0.2";
2018-03-31 17:30:40 +01:00
src = fetchPypi {
2020-03-31 15:43:05 +01:00
inherit pname version;
2021-10-09 01:59:36 +01:00
sha256 = "7027bc7bbafaab8b2c2816861d8eb372429ee3c02e193fc2f93d6c4ab9de49c5";
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;
};
}