nixpkgs/pkgs/applications/misc/pdfarranger/default.nix
2023-07-13 17:07:37 +08:00

57 lines
1.2 KiB
Nix

{ fetchFromGitHub
, lib
, wrapGAppsHook
, python3Packages
, gtk3
, poppler_gi
}:
python3Packages.buildPythonApplication rec {
pname = "pdfarranger";
version = "1.10.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-tNLy3HeHh8nBtmfJS5XhKX+KhIBnuUV2C8LwQl3mQLU=";
};
nativeBuildInputs = [
wrapGAppsHook
] ++ (with python3Packages; [
setuptools
]);
buildInputs = [
gtk3
poppler_gi
];
propagatedBuildInputs = with python3Packages; [
pygobject3
pikepdf
img2pdf
setuptools
python-dateutil
];
# incompatible with wrapGAppsHook
strictDeps = false;
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
doCheck = false; # no tests
meta = with lib; {
inherit (src.meta) homepage;
description = "Merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface";
platforms = platforms.linux;
maintainers = with maintainers; [ symphorien ];
license = licenses.gpl3Plus;
changelog = "https://github.com/pdfarranger/pdfarranger/releases/tag/${version}";
};
}