2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl, autoreconfHook }:
|
2013-01-28 20:43:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-10-26 22:03:38 +00:00
|
|
|
version = "1.1.28";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "libpaper";
|
2013-01-28 20:43:50 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/libp/libpaper/libpaper_${version}.tar.gz";
|
2020-10-26 22:03:38 +00:00
|
|
|
sha256 = "sha256-yLuUbsk9PCxyu7HXJX6QFyoipEoHoH+2uAKluyyV/dw=";
|
2013-01-28 20:43:50 +00:00
|
|
|
};
|
|
|
|
|
2020-10-26 22:03:38 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2016-12-30 15:18:18 +00:00
|
|
|
# The configure script of libpaper is buggy: it uses AC_SUBST on a headerfile
|
|
|
|
# to compile sysconfdir into the library. Autoconf however defines sysconfdir
|
|
|
|
# as "${prefix}/etc", which is not expanded by AC_SUBST so libpaper will look
|
|
|
|
# for config files in (literally, without expansion) '${prefix}/etc'. Manually
|
|
|
|
# setting sysconfdir fixes this issue.
|
|
|
|
preConfigure = ''
|
|
|
|
configureFlagsArray+=(
|
|
|
|
"--sysconfdir=$out/etc"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Set the default paper to letter (this is what libpaper uses as default as well,
|
|
|
|
# if you call getdefaultpapername()).
|
|
|
|
# The user can still override this with the PAPERCONF environment variable.
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/etc
|
|
|
|
echo letter > $out/etc/papersize
|
|
|
|
'';
|
|
|
|
|
2013-01-28 20:43:50 +00:00
|
|
|
meta = {
|
|
|
|
description = "Library for handling paper characteristics";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://packages.debian.org/unstable/source/libpaper";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.unix;
|
2013-01-28 20:43:50 +00:00
|
|
|
};
|
|
|
|
}
|