2022-05-26 10:56:36 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
2024-04-05 14:37:35 +00:00
|
|
|
, wrapGAppsHook4
|
2022-05-26 10:56:36 +00:00
|
|
|
, appstream-glib
|
|
|
|
, desktop-file-utils
|
|
|
|
, gettext
|
2024-01-11 21:07:05 +00:00
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
2022-05-26 10:56:36 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gobject-introspection
|
|
|
|
, jpegoptim
|
|
|
|
, libwebp
|
|
|
|
, optipng
|
|
|
|
, pngquant
|
2024-01-11 21:07:05 +00:00
|
|
|
, oxipng
|
2022-05-26 10:56:36 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "curtail";
|
2024-11-23 10:02:46 +00:00
|
|
|
version = "1.11.1";
|
2022-05-26 10:56:36 +00:00
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Huluti";
|
|
|
|
repo = "Curtail";
|
2022-07-13 01:44:50 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-11-23 10:02:46 +00:00
|
|
|
sha256 = "sha256-IpN1NMIT13icYnflkcZW+aSzw0Nau8UIOP38Kzji3bg=";
|
2022-05-26 10:56:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-05 14:37:35 +00:00
|
|
|
wrapGAppsHook4
|
2022-05-26 10:56:36 +00:00
|
|
|
appstream-glib
|
|
|
|
desktop-file-utils
|
|
|
|
gettext
|
2024-01-11 21:07:05 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2022-05-26 10:56:36 +00:00
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
2022-12-29 16:40:14 +00:00
|
|
|
gobject-introspection
|
2022-05-26 10:56:36 +00:00
|
|
|
];
|
|
|
|
|
2023-02-14 16:36:31 +00:00
|
|
|
buildInputs = [
|
2022-05-26 10:56:36 +00:00
|
|
|
appstream-glib
|
|
|
|
gettext
|
2024-01-11 21:07:05 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2022-05-26 10:56:36 +00:00
|
|
|
];
|
|
|
|
|
2023-02-14 16:36:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
python3.pkgs.pygobject3
|
|
|
|
];
|
|
|
|
|
2022-05-26 10:56:36 +00:00
|
|
|
preInstall = ''
|
|
|
|
patchShebangs ../build-aux/meson/postinstall.py
|
|
|
|
'';
|
|
|
|
|
2023-02-14 16:36:31 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
2024-01-11 21:07:05 +00:00
|
|
|
"--prefix" "PATH" ":" "${lib.makeBinPath [ jpegoptim libwebp optipng pngquant oxipng ]}"
|
2023-02-14 16:36:31 +00:00
|
|
|
)
|
2022-05-26 10:56:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple & useful image compressor";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "curtail";
|
2022-05-26 10:56:36 +00:00
|
|
|
homepage = "https://github.com/Huluti/Curtail";
|
|
|
|
license = licenses.gpl3Only;
|
2024-09-14 13:07:29 +00:00
|
|
|
maintainers = with maintainers; [ aleksana ];
|
2022-05-26 10:56:36 +00:00
|
|
|
};
|
|
|
|
}
|