mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 06:55:10 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
78 lines
1.3 KiB
Nix
78 lines
1.3 KiB
Nix
{ lib
|
|
, python3
|
|
, fetchFromGitHub
|
|
, wrapGAppsHook4
|
|
, appstream-glib
|
|
, desktop-file-utils
|
|
, gettext
|
|
, gtk4
|
|
, libadwaita
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, gobject-introspection
|
|
, jpegoptim
|
|
, libwebp
|
|
, optipng
|
|
, pngquant
|
|
, oxipng
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "curtail";
|
|
version = "1.11.0";
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Huluti";
|
|
repo = "Curtail";
|
|
rev = "refs/tags/${version}";
|
|
sha256 = "sha256-bN901v2M644EN7tBKN9/kv12AE2XuIPjDSCoohfevFI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
wrapGAppsHook4
|
|
appstream-glib
|
|
desktop-file-utils
|
|
gettext
|
|
gtk4
|
|
libadwaita
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
gobject-introspection
|
|
];
|
|
|
|
buildInputs = [
|
|
appstream-glib
|
|
gettext
|
|
gtk4
|
|
libadwaita
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
python3.pkgs.pygobject3
|
|
];
|
|
|
|
preInstall = ''
|
|
patchShebangs ../build-aux/meson/postinstall.py
|
|
'';
|
|
|
|
dontWrapGApps = true;
|
|
|
|
preFixup = ''
|
|
makeWrapperArgs+=(
|
|
"''${gappsWrapperArgs[@]}"
|
|
"--prefix" "PATH" ":" "${lib.makeBinPath [ jpegoptim libwebp optipng pngquant oxipng ]}"
|
|
)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Simple & useful image compressor";
|
|
mainProgram = "curtail";
|
|
homepage = "https://github.com/Huluti/Curtail";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ aleksana ];
|
|
};
|
|
}
|