2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchpatch2,
|
2024-06-05 15:53:02 +00:00
|
|
|
pillow,
|
2024-07-27 06:49:29 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
python,
|
2020-11-21 19:51:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fabulous";
|
2021-07-04 02:40:35 +00:00
|
|
|
version = "0.4.0";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
2020-11-21 19:51:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jart";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-hchlxuB5QP+VxCx+QZ2739/mR5SQmYyE+9kXLKJ2ij4=";
|
2020-11-21 19:51:51 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
patches = [
|
|
|
|
./relative_import.patch
|
|
|
|
# https://github.com/jart/fabulous/pull/22
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://github.com/jart/fabulous/commit/5779f2dfbc88fd81b5b5865247913d4775e67959.patch?full_index=1";
|
|
|
|
hash = "sha256-miWFt4vDpwWhSUgnWDjWUXoibijcDa1c1dDOSkfWoUg=";
|
|
|
|
})
|
|
|
|
];
|
2020-11-21 19:51:51 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ pillow ];
|
2020-11-21 19:51:51 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
for i in tests/*.py; do
|
|
|
|
${python.interpreter} $i
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
meta = {
|
2020-11-21 19:51:51 +00:00
|
|
|
description = "Make the output of terminal applications look fabulous";
|
|
|
|
homepage = "https://jart.github.io/fabulous";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = [ lib.maintainers.symphorien ];
|
2020-11-21 19:51:51 +00:00
|
|
|
};
|
|
|
|
}
|