depot/third_party/nixpkgs/pkgs/applications/misc/pdfslicer/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

58 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, gettext
, intltool
, pkg-config
, wrapGAppsHook3
, gtkmm3
, libuuid
, poppler
, qpdf
}:
stdenv.mkDerivation rec {
pname = "pdfslicer";
version = "1.8.8";
src = fetchFromGitHub {
owner = "junrrein";
repo = "pdfslicer";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "0sja0ddd9c8wjjpzk2ag8q1lxpj09adgmhd7wnsylincqnj2jyls";
};
postPatch = ''
# Don't build tests, vendored catch doesn't build with latest glibc.
substituteInPlace CMakeLists.txt \
--replace "add_subdirectory (tests)" ""
'';
nativeBuildInputs = [
cmake
gettext
intltool
pkg-config
wrapGAppsHook3
];
buildInputs = [
gtkmm3
libuuid
poppler
qpdf
];
CXXFLAGS =
# Pending upstream compatibility with GCC 13
lib.optional (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "13") "-Wno-changes-meaning";
meta = with lib; {
description = "Simple application to extract, merge, rotate and reorder pages of PDF documents";
homepage = "https://junrrein.github.io/pdfslicer/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ dotlambda ];
};
}