nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatch-vcs,
6 hatchling,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "termcolor";
12 version = "3.3.0";
13 pyproject = true;
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-NIhxymSOxqmpg6E6tibArM4C9RW54ZgzMrF695eVIcU=";
18 };
19
20 postPatch = ''
21 # Unknown classifier, likely only once 3.15 is released
22 sed -i "/Programming Language :: Python :: 3.15/d" pyproject.toml
23 '';
24
25 build-system = [
26 hatch-vcs
27 hatchling
28 ];
29
30 pythonImportsCheck = [ "termcolor" ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 meta = {
35 changelog = "https://github.com/termcolor/termcolor/releases/tag/${version}";
36 description = "ANSI color formatting for output in terminal";
37 homepage = "https://github.com/termcolor/termcolor";
38 license = lib.licenses.mit;
39 };
40}