fontconfig: use tarball for src to include man pages

Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
This commit is contained in:
Kenichi Kamiya 2025-04-23 17:34:44 +09:00
parent 873eb8eafe
commit b3bb63f441
No known key found for this signature in database
GPG key ID: 9BE4016A38165CCB

View file

@ -1,7 +1,7 @@
{ {
stdenv, stdenv,
lib, lib,
fetchFromGitLab, fetchurl,
pkg-config, pkg-config,
python3, python3,
freetype, freetype,
@ -12,7 +12,7 @@
autoreconfHook, autoreconfHook,
versionCheckHook, versionCheckHook,
testers, testers,
nix-update-script, gitUpdater,
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
@ -26,12 +26,11 @@ stdenv.mkDerivation (finalAttrs: {
"out" "out"
]; # $out contains all the config ]; # $out contains all the config
src = fetchFromGitLab { # GitLab repositrory does not include pre-generated man pages.
domain = "gitlab.freedesktop.org"; # ref: https://github.com/NixOS/nixpkgs/pull/401037#discussion_r2055430206
owner = "fontconfig"; src = fetchurl {
repo = "fontconfig"; url = "https://gitlab.freedesktop.org/api/v4/projects/890/packages/generic/fontconfig/${finalAttrs.version}/fontconfig-${finalAttrs.version}.tar.xz";
tag = finalAttrs.version; hash = "sha256-FluP0qEZhkyHRksjOYbEobwJ77CcZd4cpAzB6F/7d+I=";
hash = "sha256-R2y5H4JbtpCLRW7BvLXj5H6NrzVZf6+DsaQCuIhibzM=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -89,6 +88,9 @@ stdenv.mkDerivation (finalAttrs: {
${./make-fonts-conf.xsl} $out/etc/fonts/fonts.conf \ ${./make-fonts-conf.xsl} $out/etc/fonts/fonts.conf \
> fonts.conf.tmp > fonts.conf.tmp
mv fonts.conf.tmp $out/etc/fonts/fonts.conf mv fonts.conf.tmp $out/etc/fonts/fonts.conf
# We don't keep section 3 of the manpages, as they are quite large and
# probably not so useful.
rm -r $bin/share/man/man3
''; '';
nativeInstallCheckInputs = [ nativeInstallCheckInputs = [
@ -105,7 +107,9 @@ stdenv.mkDerivation (finalAttrs: {
}; };
}; };
updateScript = nix-update-script { }; updateScript = gitUpdater {
url = "https://gitlab.freedesktop.org/fontconfig/fontconfig.git";
};
}; };
meta = with lib; { meta = with lib; {