Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 69 lines 1.6 kB view raw
1{ 2 fetchFromGitHub, 3 lib, 4 wrapGAppsHook3, 5 python3Packages, 6 gtk3, 7 poppler_gi, 8 libhandy, 9 gettext, 10 stdenv, 11}: 12 13python3Packages.buildPythonApplication rec { 14 pname = "pdfarranger"; 15 version = "1.12.1"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "pdfarranger"; 20 repo = "pdfarranger"; 21 tag = version; 22 hash = "sha256-of1itPubf6LBJ4rSh1bca3yoNTiz5Qt9ar9XDe4nhxI="; 23 }; 24 25 nativeBuildInputs = [ wrapGAppsHook3 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ]; 26 27 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 28 LINTL="${lib.getLib gettext}/lib/libintl.8.dylib" 29 substituteInPlace pdfarranger/pdfarranger.py --replace-fail \ 30 "return 'libintl.8.dylib'" \ 31 "return '$LINTL'" 32 unset LINTL 33 ''; 34 35 build-system = with python3Packages; [ setuptools ]; 36 37 buildInputs = [ 38 gtk3 39 poppler_gi 40 libhandy 41 ]; 42 43 dependencies = with python3Packages; [ 44 pygobject3 45 pikepdf 46 img2pdf 47 setuptools 48 python-dateutil 49 ]; 50 51 # incompatible with wrapGAppsHook3 52 strictDeps = false; 53 dontWrapGApps = true; 54 makeWrapperArgs = [ "\${gappsWrapperArgs[@]}" ]; 55 56 doCheck = false; # no tests 57 58 meta = { 59 inherit (src.meta) homepage; 60 description = "Merge or split pdf documents and rotate, crop and rearrange their pages using a graphical interface"; 61 mainProgram = "pdfarranger"; 62 maintainers = with lib.maintainers; [ 63 symphorien 64 endle 65 ]; 66 license = lib.licenses.gpl3Plus; 67 changelog = "https://github.com/pdfarranger/pdfarranger/releases/tag/${src.tag}"; 68 }; 69}