font-{alias,util}, gccmakedep, libp{ciacces,threadstub}s: refactor and migrate to pkgs/by-name from xorg namespace (#369520)

jopejoe1 13c1207a 4acb251a

Changed files
+330 -207
lib
pkgs
by-name
fo
font-alias
font-util
gc
gccmakedep
li
libpciaccess
libpthread-stubs
servers
+20
lib/licenses.nix
···
fullName = "BSD Protection License";
};
+
bsdSourceCode = {
+
spdxId = "BSD-Source-Code";
+
fullName = "BSD Source Code Attribution";
+
};
+
bsl11 = {
spdxId = "BUSL-1.1";
fullName = "Business Source License 1.1";
···
cpl10 = {
spdxId = "CPL-1.0";
fullName = "Common Public License 1.0";
+
};
+
+
cronyx = {
+
spdxId = "Cronyx";
+
fullName = "Cronyx License";
};
curl = {
···
fullName = "MIT No Attribution";
};
+
mitOpenGroup = {
+
spdxId = "MIT-open-group";
+
fullName = "MIT Open Group variant";
+
};
+
mpl10 = {
spdxId = "MPL-1.0";
fullName = "Mozilla Public License 1.0";
···
unicode-dfs-2016 = {
spdxId = "Unicode-DFS-2016";
fullName = "Unicode License Agreement - Data Files and Software (2016)";
+
};
+
+
unicodeTOU = {
+
spdxId = "Unicode-TOU";
+
fullName = "Unicode Terms of Use";
};
unlicense = {
+40
pkgs/by-name/fo/font-alias/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
writeScript,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "font-alias";
+
version = "1.0.5";
+
+
src = fetchurl {
+
url = "mirror://xorg/individual/font/font-alias-${finalAttrs.version}.tar.xz";
+
hash = "sha256-n4niF7tz4ONjagpJP7+LfJlRVuDFPZoEdtIBtnwta24=";
+
};
+
+
passthru = {
+
updateScript = writeScript "update-${finalAttrs.pname}" ''
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p common-updater-scripts
+
+
version="$(list-directory-versions --pname ${finalAttrs.pname} \
+
--url https://xorg.freedesktop.org/releases/individual/font/ \
+
| sort -V | tail -n1)"
+
+
update-source-version ${finalAttrs.pname} "$version"
+
'';
+
};
+
+
meta = {
+
description = "Common aliases for Xorg fonts";
+
homepage = "https://gitlab.freedesktop.org/xorg/font/alias";
+
license = with lib.licenses; [
+
cronyx
+
mit
+
];
+
maintainers = [ ];
+
platforms = lib.platforms.all;
+
};
+
})
+49
pkgs/by-name/fo/font-util/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
testers,
+
writeScript,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "font-util";
+
version = "1.4.1";
+
+
src = fetchurl {
+
url = "mirror://xorg/individual/font/font-util-${finalAttrs.version}.tar.xz";
+
hash = "sha256-XJ9kEjwZSxUP7okEmZFoc4bm/zbvKve4C6U++vNozJU=";
+
};
+
+
passthru = {
+
updateScript = writeScript "update-${finalAttrs.pname}" ''
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p common-updater-scripts
+
+
version="$(list-directory-versions --pname ${finalAttrs.pname} \
+
--url https://xorg.freedesktop.org/releases/individual/font/ \
+
| sort -V | tail -n1)"
+
+
update-source-version ${finalAttrs.pname} "$version"
+
'';
+
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
};
+
+
meta = {
+
description = "X.Org font package creation/installation utilities";
+
homepage = "https://gitlab.freedesktop.org/xorg/font/util";
+
license = with lib.licenses; [
+
mit
+
bsd2
+
bsdSourceCode
+
mitOpenGroup
+
# there is a bit of a diff, but i think its close enough
+
# it was probably just adapted a bit to fit to the repository structure
+
# or its an older version that the one on spdx
+
unicodeTOU
+
];
+
maintainers = [ ];
+
pkgConfigModules = [ "fontutil" ];
+
platforms = lib.platforms.unix;
+
};
+
})
+59
pkgs/by-name/gc/gccmakedep/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
writeScript,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "gccmakedep";
+
version = "1.0.4";
+
+
src = fetchurl {
+
url = "mirror://xorg/individual/util/gccmakedep-${finalAttrs.version}.tar.xz";
+
hash = "sha256-UIj5h2n7Y8Mm6bnSy3yfSmMKKAHdHaBpcdCCkXbPJbY=";
+
};
+
+
passthru.updateScript = writeScript "update-${finalAttrs.pname}" ''
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p common-updater-scripts
+
+
version="$(list-directory-versions --pname ${finalAttrs.pname} \
+
--url https://xorg.freedesktop.org/releases/individual/util/ \
+
| sort -V | tail -n1)"
+
+
update-source-version ${finalAttrs.pname} "$version"
+
'';
+
+
meta = {
+
description = "Creates dependencies in makefiles using 'gcc -M'";
+
homepage = "https://gitlab.freedesktop.org/xorg/util/gccmakedep";
+
license = with lib.licenses; [
+
# COPYING file suggests looking at the Copyright headers of every file:
+
# upstream issue: https://gitlab.freedesktop.org/xorg/util/gccmakedep/-/issues/1
+
+
# 1. build system files Copyright Red Hat
+
hpndSellVariant
+
+
# 2. gccmakedep.man was written by Colin Watson for Debian somewhen
+
# earlier than November 2003. While I wasn't able to trace the exact
+
# source, between 1997 and 2004 the "Debian Social Contract, Version
+
# 1.0" was in effect, which requires all components of the Debian
+
# Operating System to be free software, which includes this man page.
+
# https://www.debian.org/social_contract.1.0
+
free
+
+
# 3. gccmakedep.in, originally named gccmdep.cpp was copied from the
+
# XFree86 project around 2000. While it states to be "Based on
+
# mdepend.cpp and code supplied by Hongjiu Lu", that doesn't matter
+
# because it was supposedly completely rewritten by XFree86.
+
# XFree86 code without any explicit Copyright Statement is under X11.
+
x11
+
+
# 4. some files don't have any license info, but they are all trivial
+
];
+
mainProgram = "gccmakedep";
+
maintainers = [ ];
+
platforms = lib.platforms.unix;
+
};
+
})
+81
pkgs/by-name/li/libpciaccess/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
testers,
+
writeScript,
+
pkg-config,
+
meson,
+
ninja,
+
zlib,
+
netbsd,
+
hwdata,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "libpciaccess";
+
version = "0.18.1";
+
+
src = fetchurl {
+
url = "mirror://xorg/individual/lib/libpciaccess-${finalAttrs.version}.tar.xz";
+
hash = "sha256-SvQ0RLOK21VF0O0cLORtlgjMR7McI4f8UYFlZ2Wm+nY=";
+
};
+
+
strictDeps = true;
+
+
nativeBuildInputs = [
+
pkg-config
+
meson
+
ninja
+
];
+
+
buildInputs =
+
[ zlib ]
+
++ lib.optionals stdenv.hostPlatform.isNetBSD [
+
netbsd.libarch
+
netbsd.libpci
+
];
+
+
mesonFlags = [
+
(lib.mesonOption "pci-ids" "${hwdata}/share/hwdata")
+
(lib.mesonEnable "zlib" true)
+
];
+
+
passthru = {
+
updateScript = writeScript "update-${finalAttrs.pname}" ''
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p common-updater-scripts
+
+
version="$(list-directory-versions --pname ${finalAttrs.pname} \
+
--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 = "Generic PCI access library";
+
homepage = "https://gitlab.freedesktop.org/xorg/lib/libpciaccess";
+
license = with lib.licenses; [
+
mit
+
isc
+
x11
+
];
+
pkgConfigModules = [ "pciaccess" ];
+
# https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/6cd5a4afbb70868c7746de8d50dea59e02e9acf2/configure.ac#L108-114
+
platforms =
+
with lib.platforms;
+
cygwin
+
++ freebsd
+
++ illumos
+
++ linux
+
++ lib.platforms.netbsd # otherwise netbsd from the function arguments is used
+
++ openbsd;
+
badPlatforms = [
+
# mandatory shared library
+
lib.systems.inspect.platformPatterns.isStatic
+
];
+
};
+
})
+43
pkgs/by-name/li/libpthread-stubs/package.nix
···
+
{
+
lib,
+
stdenv,
+
fetchurl,
+
testers,
+
writeScript,
+
}:
+
+
stdenv.mkDerivation (finalAttrs: {
+
pname = "libpthread-stubs";
+
version = "0.5";
+
+
src = fetchurl {
+
url = "mirror://xorg/individual/lib/libpthread-stubs-${finalAttrs.version}.tar.xz";
+
hash = "sha256-WdpWbezOunwqeXCkoDtI2ZBfEmL/lEEKZJIk4z0kQrw=";
+
};
+
+
passthru = {
+
updateScript = writeScript "update-${finalAttrs.pname}" ''
+
#!/usr/bin/env nix-shell
+
#!nix-shell -i bash -p common-updater-scripts
+
+
version="$(list-directory-versions --pname ${finalAttrs.pname} \
+
--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 = "Provides a pkg-config file `pthread-stubs.pc` containing the Cflags/Libs flags applicable to programs/libraries that use only lightweight pthread API";
+
homepage = "https://gitlab.freedesktop.org/xorg/lib/pthread-stubs";
+
# gitlab says x11-distribute-modifications but it's not
+
# maybe due to https://github.com/spdx/spdx-online-tools/issues/540
+
license = lib.licenses.x11;
+
maintainers = [ ];
+
pkgConfigModules = [ "pthread-stubs" ];
+
# on these platforms according to the readme
+
platforms = with lib.platforms; linux ++ cygwin ++ darwin ++ [ "x86_64-solaris" ];
+
};
+
})
+15 -158
pkgs/servers/x11/xorg/default.nix
···
# THIS IS A GENERATED FILE. DO NOT EDIT!
{
lib,
-
pixman,
+
font-alias,
+
font-util,
+
gccmakedep,
+
libpciaccess,
+
libpthread-stubs,
luit,
+
pixman,
}:
self: with self; {
-
inherit pixman;
-
inherit luit;
+
inherit
+
gccmakedep
+
libpciaccess
+
luit
+
pixman
+
;
+
fontalias = font-alias;
+
fontutil = font-util;
+
libpthreadstubs = libpthread-stubs;
# THIS IS A GENERATED FILE. DO NOT EDIT!
appres = callPackage (
···
buildInputs = [ fontutil ];
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' '';
-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
-
meta = {
-
pkgConfigModules = [ ];
-
platforms = lib.platforms.unix;
-
};
-
})
-
) { };
-
-
# THIS IS A GENERATED FILE. DO NOT EDIT!
-
fontalias = callPackage (
-
{
-
stdenv,
-
pkg-config,
-
fetchurl,
-
testers,
-
}:
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "font-alias";
-
version = "1.0.5";
-
builder = ./builder.sh;
-
src = fetchurl {
-
url = "mirror://xorg/individual/font/font-alias-1.0.5.tar.xz";
-
sha256 = "0vkb5mybc0fjfq29lgf5w1b536bwifzkyj8ad9iy7q3kpcby52cz";
-
};
-
hardeningDisable = [
-
"bindnow"
-
"relro"
-
];
-
strictDeps = true;
-
nativeBuildInputs = [ pkg-config ];
-
buildInputs = [ ];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ ];
···
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
-
fontutil = callPackage (
-
{
-
stdenv,
-
pkg-config,
-
fetchurl,
-
testers,
-
}:
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "font-util";
-
version = "1.4.1";
-
builder = ./builder.sh;
-
src = fetchurl {
-
url = "mirror://xorg/individual/font/font-util-1.4.1.tar.xz";
-
sha256 = "15fcd3rzlgm51fwgfapg6vzyd1kkd28rj149xq7iajqr7h9697sw";
-
};
-
hardeningDisable = [
-
"bindnow"
-
"relro"
-
];
-
strictDeps = true;
-
nativeBuildInputs = [ pkg-config ];
-
buildInputs = [ ];
-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
-
meta = {
-
pkgConfigModules = [ "fontutil" ];
-
platforms = lib.platforms.unix;
-
};
-
})
-
) { };
-
-
# THIS IS A GENERATED FILE. DO NOT EDIT!
fontwinitzkicyrillic = callPackage (
stdenv,
···
) { };
# THIS IS A GENERATED FILE. DO NOT EDIT!
-
gccmakedep = callPackage (
-
{
-
stdenv,
-
pkg-config,
-
fetchurl,
-
testers,
-
}:
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "gccmakedep";
-
version = "1.0.4";
-
builder = ./builder.sh;
-
src = fetchurl {
-
url = "mirror://xorg/individual/util/gccmakedep-1.0.4.tar.xz";
-
sha256 = "1di5rxv930nhf5ls07fx04l0lqsakxycplmrx4kc6qzvd63zk22h";
-
};
-
hardeningDisable = [
-
"bindnow"
-
"relro"
-
];
-
strictDeps = true;
-
nativeBuildInputs = [ pkg-config ];
-
buildInputs = [ ];
-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
-
meta = {
-
pkgConfigModules = [ ];
-
platforms = lib.platforms.unix;
-
};
-
})
-
) { };
-
-
# THIS IS A GENERATED FILE. DO NOT EDIT!
iceauth = callPackage (
stdenv,
···
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ "fontenc" ];
-
platforms = lib.platforms.unix;
-
};
-
})
-
) { };
-
-
# THIS IS A GENERATED FILE. DO NOT EDIT!
-
libpciaccess = callPackage (
-
{
-
stdenv,
-
pkg-config,
-
fetchurl,
-
testers,
-
}:
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "libpciaccess";
-
version = "0.18.1";
-
builder = ./builder.sh;
-
src = fetchurl {
-
url = "mirror://xorg/individual/lib/libpciaccess-0.18.1.tar.xz";
-
sha256 = "0xpslrjnfrc1a7y8f8qwnd3wq24ndpj2q77ds12mbnwand239x2a";
-
};
-
hardeningDisable = [
-
"bindnow"
-
"relro"
-
];
-
strictDeps = true;
-
nativeBuildInputs = [ pkg-config ];
-
buildInputs = [ ];
-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
-
meta = {
-
pkgConfigModules = [ "pciaccess" ];
-
platforms = lib.platforms.unix;
-
};
-
})
-
) { };
-
-
# THIS IS A GENERATED FILE. DO NOT EDIT!
-
libpthreadstubs = callPackage (
-
{
-
stdenv,
-
pkg-config,
-
fetchurl,
-
testers,
-
}:
-
stdenv.mkDerivation (finalAttrs: {
-
pname = "libpthread-stubs";
-
version = "0.5";
-
builder = ./builder.sh;
-
src = fetchurl {
-
url = "mirror://xorg/individual/xcb/libpthread-stubs-0.5.tar.xz";
-
sha256 = "1g224hyy694jch54357zc895z46r90xs193hg4m7rfnfxinmdnjr";
-
};
-
hardeningDisable = [
-
"bindnow"
-
"relro"
-
];
-
strictDeps = true;
-
nativeBuildInputs = [ pkg-config ];
-
buildInputs = [ ];
-
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
-
meta = {
-
pkgConfigModules = [ "pthread-stubs" ];
platforms = lib.platforms.unix;
};
})
+18 -3
pkgs/servers/x11/xorg/generate-expr-from-tarballs.pl
···
$pcMap{"GL"} = "libGL";
$pcMap{"gbm"} = "libgbm";
$pcMap{"hwdata"} = "hwdata";
+
$pcMap{"fontutil"} = "fontutil";
+
$pcMap{"pciaccess"} = "libpciaccess";
+
$pcMap{"pthread-stubs"} = "libpthreadstubs";
$pcMap{"\$PIXMAN"} = "pixman";
$pcMap{"\$RENDERPROTO"} = "xorgproto";
$pcMap{"\$DRI3PROTO"} = "xorgproto";
···
# THIS IS A GENERATED FILE. DO NOT EDIT!
{
lib,
-
pixman,
+
font-alias,
+
font-util,
+
gccmakedep,
+
libpciaccess,
+
libpthread-stubs,
luit,
+
pixman,
}:
self: with self; {
-
inherit pixman;
-
inherit luit;
+
inherit
+
gccmakedep
+
libpciaccess
+
luit
+
pixman
+
;
+
fontalias = font-alias;
+
fontutil = font-util;
+
libpthreadstubs = libpthread-stubs;
EOF
-40
pkgs/servers/x11/xorg/overrides.nix
···
};
});
-
gccmakedep = addMainProgram super.gccmakedep { };
iceauth = addMainProgram super.iceauth { };
ico = addMainProgram super.ico { };
···
"out"
"dev"
]; # mainly to avoid propagation
-
});
-
-
libpciaccess = super.libpciaccess.overrideAttrs (attrs: {
-
nativeBuildInputs = attrs.nativeBuildInputs ++ [
-
meson
-
ninja
-
];
-
-
buildInputs =
-
attrs.buildInputs
-
++ [ zlib ]
-
++ lib.optionals stdenv.hostPlatform.isNetBSD [
-
netbsd.libarch
-
netbsd.libpci
-
];
-
-
mesonFlags = [
-
(lib.mesonOption "pci-ids" "${hwdata}/share/hwdata")
-
(lib.mesonEnable "zlib" true)
-
];
-
-
meta = attrs.meta // {
-
# https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/master/configure.ac#L108-114
-
platforms =
-
lib.fold (os: ps: ps ++ lib.platforms.${os})
-
[ ]
-
[ "cygwin" "freebsd" "linux" "netbsd" "openbsd" "illumos" ];
-
badPlatforms = [
-
# mandatory shared library
-
lib.systems.inspect.platformPatterns.isStatic
-
];
-
};
-
});
-
-
libpthreadstubs = super.libpthreadstubs.overrideAttrs (attrs: {
-
# only contains a pkgconfig file on linux and windows
-
meta = attrs.meta // {
-
platforms = lib.platforms.unix ++ lib.platforms.windows;
-
};
});
setxkbmap = super.setxkbmap.overrideAttrs (attrs: {
-5
pkgs/servers/x11/xorg/tarballs.list
···
-
mirror://xorg/individual/xcb/libpthread-stubs-0.5.tar.xz
mirror://xorg/individual/xcb/xcb-util-0.4.1.tar.xz
mirror://xorg/individual/xcb/xcb-util-errors-1.0.1.tar.xz
mirror://xorg/individual/xcb/xcb-util-image-0.4.1.tar.xz
···
mirror://xorg/individual/font/font-adobe-utopia-75dpi-1.0.5.tar.xz
mirror://xorg/individual/font/font-adobe-utopia-100dpi-1.0.5.tar.xz
mirror://xorg/individual/font/font-adobe-utopia-type1-1.0.5.tar.xz
-
mirror://xorg/individual/font/font-alias-1.0.5.tar.xz
mirror://xorg/individual/font/font-arabic-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-100dpi-1.0.4.tar.xz
···
mirror://xorg/individual/font/font-screen-cyrillic-1.0.5.tar.xz
mirror://xorg/individual/font/font-sony-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-sun-misc-1.0.4.tar.xz
-
mirror://xorg/individual/font/font-util-1.4.1.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
https://gitlab.freedesktop.org/xorg/lib/libAppleWM/-/archive/be972ebc3a97292e7d2b2350eff55ae12df99a42/libAppleWM-be972ebc3a97292e7d2b2350eff55ae12df99a42.tar.bz2
···
mirror://xorg/individual/lib/libfontenc-1.1.8.tar.xz
mirror://xorg/individual/lib/libFS-1.0.10.tar.xz
mirror://xorg/individual/lib/libICE-1.1.2.tar.xz
-
mirror://xorg/individual/lib/libpciaccess-0.18.1.tar.xz
mirror://xorg/individual/lib/libSM-1.2.5.tar.xz
mirror://xorg/individual/lib/libWindowsWM-1.0.1.tar.bz2
mirror://xorg/individual/lib/libX11-1.8.12.tar.xz
···
mirror://xorg/individual/proto/xcb-proto-1.17.0.tar.xz
mirror://xorg/individual/proto/xorgproto-2024.1.tar.xz
mirror://xorg/individual/util/bdftopcf-1.1.2.tar.xz
-
mirror://xorg/individual/util/gccmakedep-1.0.4.tar.xz
mirror://xorg/individual/util/imake-1.0.10.tar.xz
mirror://xorg/individual/util/lndir-1.0.5.tar.xz
mirror://xorg/individual/util/makedepend-1.0.9.tar.xz
+5 -1
pkgs/servers/x11/xorg/update.py
···
#!/usr/bin/env nix-shell
-
#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])"
+
#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt-rfc-style "python3.withPackages (ps: [ ps. packaging ps.beautifulsoup4 ps.requests ])"
# Usage: Run ./update.py from the directory containing tarballs.list. The script checks for the
# latest versions of all packages, updates the expressions if any update is found, and commits
···
print("Generating updated expr (slow)...")
subprocess.run(["./generate-expr-from-tarballs.pl", "tarballs.list"], check=True)
+
+
print("Formatting generated expr...")
+
+
subprocess.run(["nixfmt", "default.nix"], check=True)
print("Committing...")