mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
4f0dadbf38
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-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
freetype,
|
|
libtool,
|
|
flex,
|
|
bison,
|
|
pkg-config,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "ttf-mkfontdir";
|
|
version = "3.0.9-6";
|
|
|
|
src = fetchurl {
|
|
url = "http://mirror.fsf.org/trisquel/pool/main/t/ttmkfdir/ttmkfdir_3.0.9.orig.tar.gz";
|
|
sha256 = "0n6bmmndmp4c1myisvv7cby559gzgvwsw4rfw065a3f92m87jxiq";
|
|
};
|
|
|
|
# all the patches up from ttmkfdir-3.0.9/Makefile should be reviewed by someone
|
|
# who knows more about C/C++ ..
|
|
patches = [
|
|
(fetchurl {
|
|
url = "http://mirror.fsf.org/trisquel/pool/main/t/ttmkfdir/ttmkfdir_3.0.9-6.diff.gz";
|
|
sha256 = "141kxaf2by8nf87hqyszaxi0n7nnmswr1nh2i5r5bsvxxmaj9633";
|
|
})
|
|
|
|
./cstring.patch # also fixes some other compilation issues (freetype includes)
|
|
];
|
|
|
|
# cross-compilation fixes:
|
|
# - fix libtool, the reason it does not work in nativeBuildInputs is complicated
|
|
# see https://github.com/NixOS/nixpkgs/pull/192878 for more info
|
|
# - freetype-config doesn't properly support cross-compilation, but is just a thin
|
|
# wrapper around pkg-config anyways
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace "libtool " "${libtool}/bin/libtool --tag=CXX " \
|
|
--replace "freetype-config" "${stdenv.cc.targetPrefix}pkg-config freetype2"
|
|
'';
|
|
|
|
makeFlags = [
|
|
"DESTDIR=${placeholder "out"}"
|
|
"BINDIR=/bin"
|
|
"CXX=${stdenv.cc.targetPrefix}c++"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
flex
|
|
bison
|
|
pkg-config
|
|
];
|
|
buildInputs = [ freetype ];
|
|
|
|
meta = {
|
|
description = "Create fonts.dir for TTF font directory";
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "ttmkfdir";
|
|
};
|
|
}
|