1{ lib, stdenv, fetchzip }:
2
3stdenv.mkDerivation rec {
4 name = "updfparser";
5 version = "unstable-2023-01-10";
6 rev = "a421098092ba600fb1686a7df8fc58cd67429f59";
7
8 src = fetchzip {
9 url = "https://indefero.soutade.fr/p/updfparser/source/download/${rev}/";
10 sha256 = "sha256-Kt1QDj7E0GaT615kJW2MQKF9BeU5U7/95TQKODpxgNI=";
11 extension = "zip";
12 };
13
14 makeFlags = [ "BUILD_STATIC=1" "BUILD_SHARED=1" ];
15
16 installPhase = ''
17 runHook preInstall
18 install -Dt $out/include include/*.h
19 install -Dt $out/lib libupdfparser.so
20 install -Dt $out/lib libupdfparser.a
21 runHook postInstall
22 '';
23
24 meta = with lib; {
25 description = "A very simple PDF parser";
26 homepage = "https://indefero.soutade.fr/p/updfparser";
27 license = licenses.lgpl3Plus;
28 maintainers = with maintainers; [ autumnal ];
29 platforms = platforms.all;
30 };
31}