1 { lib, stdenv, fetchurl, autoreconfHook }:
3 stdenv.mkDerivation rec {
8 url = "mirror://debian/pool/main/libp/libpaper/libpaper_${version}.tar.gz";
9 sha256 = "sha256-yLuUbsk9PCxyu7HXJX6QFyoipEoHoH+2uAKluyyV/dw=";
12 nativeBuildInputs = [ autoreconfHook ];
14 # The configure script of libpaper is buggy: it uses AC_SUBST on a headerfile
15 # to compile sysconfdir into the library. Autoconf however defines sysconfdir
16 # as "${prefix}/etc", which is not expanded by AC_SUBST so libpaper will look
17 # for config files in (literally, without expansion) '${prefix}/etc'. Manually
18 # setting sysconfdir fixes this issue.
20 configureFlagsArray+=(
21 "--sysconfdir=$out/etc"
25 # Set the default paper to letter (this is what libpaper uses as default as well,
26 # if you call getdefaultpapername()).
27 # The user can still override this with the PAPERCONF environment variable.
30 echo letter > $out/etc/papersize
34 description = "Library for handling paper characteristics";
35 homepage = "http://packages.debian.org/unstable/source/libpaper";
36 license = lib.licenses.gpl2;
37 platforms = lib.platforms.unix;