Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paperwork: unbreak #327214

Merged
merged 2 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions pkgs/development/python-modules/fabulous/default.nix
pyrox0 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
pillow,
setuptools,
python,
}:

buildPythonPackage rec {
pname = "fabulous";
version = "0.4.0";
format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "jart";
Expand All @@ -18,20 +20,29 @@ buildPythonPackage rec {
hash = "sha256-hchlxuB5QP+VxCx+QZ2739/mR5SQmYyE+9kXLKJ2ij4=";
};

patches = [ ./relative_import.patch ];
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=";
})
eclairevoyant marked this conversation as resolved.
Show resolved Hide resolved
];

propagatedBuildInputs = [ pillow ];
build-system = [ setuptools ];

dependencies = [ pillow ];

checkPhase = ''
for i in tests/*.py; do
${python.interpreter} $i
done
'';

meta = with lib; {
meta = {
description = "Make the output of terminal applications look fabulous";
homepage = "https://jart.github.io/fabulous";
license = licenses.asl20;
maintainers = [ maintainers.symphorien ];
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.symphorien ];
};
}
31 changes: 13 additions & 18 deletions pkgs/development/python-modules/pypillowfight/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,39 @@
lib,
buildPythonPackage,
fetchFromGitLab,
nose,
pillow,
isPy3k,
isPyPy,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "pypillowfight";
version = "0.3.0";
format = "setuptools";
version = "0.3.0-unstable-2024-07-07";
pyproject = true;

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
group = "World";
owner = "OpenPaperwork";
repo = "libpillowfight";
rev = version;
sha256 = "096242v425mlqqj5g1giy59p7grxp05g78w6bk37vzph98jrgv3w";
# Currently no tagged release past 0.3.0 and we need these patches to fix Python 3.12 compat
rev = "4d5f739b725530cd61e709071d31e9f707c64bd6";
hash = "sha256-o5FzUSDq0lwkXGXRMsS5NB/Mp4Ie833wkxKPziR23f4=";
};

prePatch = ''
echo '#define INTERNAL_PILLOWFIGHT_VERSION "${version}"' > src/pillowfight/_version.h
'';

# Disable tests because they're designed to only work on Debian:
# https://github.com/jflesch/libpillowfight/issues/2#issuecomment-268259174
doCheck = false;
build-system = [ setuptools ];

# Python 2.x is not supported, see:
# https://github.com/jflesch/libpillowfight/issues/1
disabled = !isPy3k && !isPyPy;
dependencies = [ pillow ];

# This is needed by setup.py regardless of whether tests are enabled.
buildInputs = [ nose ];
propagatedBuildInputs = [ pillow ];
nativeCheckInputs = [ pytestCheckHook ];

meta = with lib; {
meta = {
description = "Library containing various image processing algorithms";
inherit (src.meta) homepage;
license = licenses.gpl3Plus;
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}