about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/updfparser/default.nix
blob: aa25f9f2dffdd52ad6c8d726b728b5b5502982b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv, fetchzip }:

stdenv.mkDerivation rec {
  name = "updfparser";
  version = "unstable-2023-08-08";
  rev = "c5ce75b9eea8ebb2746b13eeb0f335813c615115";

  src = fetchzip {
    url = "https://indefero.soutade.fr/p/updfparser/source/download/${rev}/";
    hash = "sha256-RT7mvu43Izp0rHhKq4wR4kt0TDfzHvB2NGMR+fxO5UM=";
    extension = "zip";
  };

  makeFlags = [ "BUILD_STATIC=1" "BUILD_SHARED=1" ];

  installPhase = ''
    runHook preInstall
    install -Dt $out/include include/*.h
    install -Dt $out/lib libupdfparser.so
    install -Dt $out/lib libupdfparser.a
    runHook postInstall
  '';

  meta = with lib; {
    description = "A very simple PDF parser";
    homepage = "https://indefero.soutade.fr/p/updfparser";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ autumnal ];
    platforms = platforms.all;
  };
}