libxft: refactor, move to pkgs/by-name and rename from xorg.libXft
relevant changes: - remove the patched in 'Requires: freetype2' as it does not matter since the dependency is propagated anyway - remove 'inherit freetype fontconfig' from passthru because that was probably there through an error anyways. It was added here https://github.com/NixOS/nixpkgs/commit/9454f71fefcbe413fdfcb61b510256f1301c5f5c
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
pkg-config,
|
||||
fontconfig,
|
||||
freetype,
|
||||
libx11,
|
||||
libxrender,
|
||||
xorgproto,
|
||||
writeScript,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libxft";
|
||||
version = "2.3.9";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/lib/libXft-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-YKJbeJRe1pMmNbO7GJmlF9Md90VuaYZ/+6J/if85dvU=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
fontconfig
|
||||
freetype
|
||||
libx11
|
||||
libxrender
|
||||
xorgproto
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
xorgproto
|
||||
# header file dependencies
|
||||
freetype
|
||||
fontconfig
|
||||
libxrender
|
||||
];
|
||||
|
||||
configureFlags = lib.optional (
|
||||
stdenv.hostPlatform != stdenv.buildPlatform
|
||||
) "--enable-malloc0returnsnull";
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname libXft \
|
||||
--url https://xorg.freedesktop.org/releases/individual/lib/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "X FreeType library";
|
||||
longDescription = ''
|
||||
libXft is the client side font rendering library, using libfreetype, libX11, and the
|
||||
X Render extension to display anti-aliased text.
|
||||
'';
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/lib/libxft";
|
||||
license = lib.licenses.hpndSellVariant;
|
||||
maintainers = [ ];
|
||||
pkgConfigModules = [ "xft" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -38,6 +38,7 @@
|
||||
libxfixes,
|
||||
libxfont_1,
|
||||
libxfont_2,
|
||||
libxft,
|
||||
libxmu,
|
||||
libxpm,
|
||||
libxrandr,
|
||||
@@ -142,6 +143,7 @@ self: with self; {
|
||||
libXfixes = libxfixes;
|
||||
libXfont2 = libxfont_2;
|
||||
libXfont = libxfont_1;
|
||||
libXft = libxft;
|
||||
libXmu = libxmu;
|
||||
libXpm = libxpm;
|
||||
libXrandr = libxrandr;
|
||||
@@ -1766,48 +1768,6 @@ self: with self; {
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libXft = callPackage (
|
||||
{
|
||||
stdenv,
|
||||
pkg-config,
|
||||
fetchurl,
|
||||
fontconfig,
|
||||
freetype,
|
||||
libX11,
|
||||
xorgproto,
|
||||
libXrender,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libXft";
|
||||
version = "2.3.9";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/lib/libXft-2.3.9.tar.xz";
|
||||
sha256 = "1xbn77zqjzx2zdzqcsbf8pvivlqplnciifxk6lk97mjyjiw5p8k0";
|
||||
};
|
||||
hardeningDisable = [
|
||||
"bindnow"
|
||||
"relro"
|
||||
];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
fontconfig
|
||||
freetype
|
||||
libX11
|
||||
xorgproto
|
||||
libXrender
|
||||
];
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
meta = {
|
||||
pkgConfigModules = [ "xft" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
libXi = callPackage (
|
||||
{
|
||||
|
||||
@@ -69,6 +69,7 @@ $pcMap{"xext"} = "libXext";
|
||||
$pcMap{"xfixes"} = "libXfixes";
|
||||
$pcMap{"xfont"} = "libXfont";
|
||||
$pcMap{"xfont2"} = "libXfont2";
|
||||
$pcMap{"xft"} = "libXft";
|
||||
$pcMap{"xmu"} = "libXmu";
|
||||
$pcMap{"xmuu"} = "libXmu";
|
||||
$pcMap{"xpm"} = "libXpm";
|
||||
@@ -358,6 +359,7 @@ print OUT <<EOF;
|
||||
libxfixes,
|
||||
libxfont_1,
|
||||
libxfont_2,
|
||||
libxft,
|
||||
libxmu,
|
||||
libxpm,
|
||||
libxrandr,
|
||||
@@ -462,6 +464,7 @@ self: with self; {
|
||||
libXfixes = libxfixes;
|
||||
libXfont2 = libxfont_2;
|
||||
libXfont = libxfont_1;
|
||||
libXft = libxft;
|
||||
libXmu = libxmu;
|
||||
libXpm = libxpm;
|
||||
libXrandr = libxrandr;
|
||||
|
||||
@@ -194,27 +194,6 @@ self: super:
|
||||
};
|
||||
});
|
||||
|
||||
libXft = super.libXft.overrideAttrs (attrs: {
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
propagatedBuildInputs = attrs.propagatedBuildInputs or [ ] ++ [
|
||||
xorg.libXrender
|
||||
freetype
|
||||
fontconfig
|
||||
];
|
||||
configureFlags = attrs.configureFlags or [ ] ++ malloc0ReturnsNullCrossFlag;
|
||||
|
||||
# the include files need ft2build.h, and Requires.private isn't enough for us
|
||||
postInstall = ''
|
||||
sed "/^Requires:/s/$/, freetype2/" -i "$dev/lib/pkgconfig/xft.pc"
|
||||
'';
|
||||
passthru = attrs.passthru // {
|
||||
inherit freetype fontconfig;
|
||||
};
|
||||
});
|
||||
|
||||
libXi = super.libXi.overrideAttrs (attrs: {
|
||||
outputs = [
|
||||
"out"
|
||||
|
||||
@@ -126,7 +126,6 @@ mirror://xorg/individual/font/font-sun-misc-1.0.4.tar.xz
|
||||
mirror://xorg/individual/font/font-winitzki-cyrillic-1.0.4.tar.xz
|
||||
mirror://xorg/individual/font/font-xfree86-type1-1.0.5.tar.xz
|
||||
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
|
||||
mirror://xorg/individual/lib/libXft-2.3.9.tar.xz
|
||||
mirror://xorg/individual/lib/libXi-1.8.2.tar.xz
|
||||
mirror://xorg/individual/lib/libXinerama-1.1.5.tar.xz
|
||||
mirror://xorg/individual/lib/libxkbfile-1.1.3.tar.xz
|
||||
|
||||
Reference in New Issue
Block a user