
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19
.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
autoreconfHook,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.1.29";
|
|
pname = "libpaper";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://debian/pool/main/libp/libpaper/libpaper_${version}.tar.gz";
|
|
hash = "sha256-JjMOIemjEkZY1RX9hQsM3lRv9C2JsllqUmTF8Wd/BUc=";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
# 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
|
|
'';
|
|
|
|
meta = {
|
|
description = "Library for handling paper characteristics";
|
|
homepage = "http://packages.debian.org/unstable/source/libpaper";
|
|
license = lib.licenses.gpl2;
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|