Skip to content

Commit

Permalink
python312Packages.blessings: modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Aug 20, 2024
1 parent 6aba654 commit ac54491
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pkgs/development/python-modules/blessings/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools,
fetchpatch2,
six,
pytestCheckHook,
ncurses
ncurses,
}:

buildPythonPackage rec {
pname = "blessings";
version = "1.7";
format = "setuptools";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "98e5854d805f50a5b58ac2333411b0482516a8210f23f43308baeb58d77c157d";
hash = "sha256-mOWFTYBfUKW1isIzNBGwSCUWqCEPI/QzCLrrWNd8FX0=";
};

build-system = [ setuptools ];

patches = [
# migrate to pypi, see https://github.com/erikrose/blessings/pull/165

Expand All @@ -31,16 +34,16 @@ buildPythonPackage rec {
./force-styling-for-color-tests.patch
];

propagatedBuildInputs = [ six ];
dependencies = [ six ];

nativeCheckInputs = [
pytestCheckHook
ncurses
];

preCheck = ''
export LINES=22
export COLUMNS=80
export LINES=22
export COLUMNS=80
'';

disabledTests = [
Expand All @@ -59,10 +62,10 @@ buildPythonPackage rec {

pytestFlagsArray = [ "blessings/tests.py" ];

meta = with lib; {
meta = {
homepage = "https://github.com/erikrose/blessings";
description = "Thin, practical wrapper around terminal coloring, styling, and positioning";
license = licenses.mit;
maintainers = with maintainers; [ domenkozar ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ domenkozar ];
};
}

0 comments on commit ac54491

Please sign in to comment.