2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, wrapGAppsHook
|
|
|
|
, appstream-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, gettext
|
2024-01-13 08:15:51 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2022-06-16 17:23:12 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gobject-introspection
|
|
|
|
, jpegoptim
|
|
|
|
, libwebp
|
|
|
|
, optipng
|
|
|
|
, pngquant
|
2024-01-13 08:15:51 +00:00
|
|
|
, oxipng
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "curtail";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.8.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Huluti";
|
|
|
|
repo = "Curtail";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
sha256 = "sha256-LLz4nZ9WFQMogQR2gCKn80gvHUG5hlpQpcNjpr4fs2s=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
2024-01-13 08:15:51 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2022-06-16 17:23:12 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2023-03-15 16:39:30 +00:00
|
|
|
gobject-introspection
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
buildInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
appstream-glib
|
|
|
|
gettext
|
2024-01-13 08:15:51 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3.pkgs.pygobject3
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
patchShebangs ../build-aux/meson/postinstall.py
|
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2024-01-13 08:15:51 +00:00
|
|
|
"--prefix" "PATH" ":" "${lib.makeBinPath [ jpegoptim libwebp optipng pngquant oxipng ]}"
|
2023-03-15 16:39:30 +00:00
|
|
|
)
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple & useful image compressor";
|
|
|
|
homepage = "https://github.com/Huluti/Curtail";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ anselmschueler ];
|
|
|
|
};
|
|
|
|
}
|