c3fc019082
Without the change build fails against gcc-13 as:
$ nix build --impure --expr 'with import ./. {}; updfparser.override { stdenv = gcc13Stdenv; }'
error: builder for '/nix/store/8p5hwa50rild5yaijxg9iavr3lyvi3w2-updfparser.drv' failed with exit code 2;
last 10 log lines:
> building
> build flags: SHELL=/nix/store/xdqlrixlspkks50m9b0mpvag65m3pf2w-bash-5.2-p15/bin/bash BUILD_STATIC=1 BUILD_SHARED=1
> mkdir obj
> g++ -Wall -fPIC -I./include -O2 -c src/uPDFParser.cpp -o obj/uPDFParser.o
> In file included from ./include/uPDFParser.h:34,
> from src/uPDFParser.cpp:26:
> ./include/uPDFObject.h:49:52: error: 'uint64_t' has not been declared
> 49 | Object(int objectId, int generationNumber, uint64_t offset, bool isNew=false,
> | ^~~~~~~~
32 lines
857 B
Nix
32 lines
857 B
Nix
{ 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;
|
|
};
|
|
}
|