at 18.03-beta 37 lines 1.3 kB view raw
1{ stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 version = "1.1.24"; 5 name = "libpaper-${version}"; 6 7 src = fetchurl { 8 url = "mirror://debian/pool/main/libp/libpaper/libpaper_${version}.tar.gz"; 9 sha256 = "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q"; 10 }; 11 12 # The configure script of libpaper is buggy: it uses AC_SUBST on a headerfile 13 # to compile sysconfdir into the library. Autoconf however defines sysconfdir 14 # as "${prefix}/etc", which is not expanded by AC_SUBST so libpaper will look 15 # for config files in (literally, without expansion) '${prefix}/etc'. Manually 16 # setting sysconfdir fixes this issue. 17 preConfigure = '' 18 configureFlagsArray+=( 19 "--sysconfdir=$out/etc" 20 ) 21 ''; 22 23 # Set the default paper to letter (this is what libpaper uses as default as well, 24 # if you call getdefaultpapername()). 25 # The user can still override this with the PAPERCONF environment variable. 26 postInstall = '' 27 mkdir -p $out/etc 28 echo letter > $out/etc/papersize 29 ''; 30 31 meta = { 32 description = "Library for handling paper characteristics"; 33 homepage = http://packages.debian.org/unstable/source/libpaper; 34 license = stdenv.lib.licenses.gpl2; 35 platforms = stdenv.lib.platforms.unix; 36 }; 37}