push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

1
pkgs/servers/x11/xorg/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
download-cache/

View File

@@ -0,0 +1,39 @@
# This is the builder for all X.org components.
# After installation, automatically add all "Requires" fields in the
# pkgconfig files (*.pc) to the propagated build inputs.
origPostInstall=$postInstall
postInstall() {
if test -n "$origPostInstall"; then eval "$origPostInstall"; fi
local r p requires
set +o pipefail
requires=$(grep "Requires:" ${!outputDev}/lib/pkgconfig/*.pc | \
sed "s/Requires://" | sed "s/,/ /g")
set -o pipefail
echo "propagating requisites $requires"
for r in $requires; do
for p in "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}"; do
if test -e $p/lib/pkgconfig/$r.pc; then
echo " found requisite $r in $p"
appendToVar propagatedBuildInputs "$p"
fi
done
done
}
prependToVar installFlags "appdefaultdir=$out/share/X11/app-defaults"
if test -n "$x11BuildHook"; then
source $x11BuildHook
fi
enableParallelBuilding=1
enableParallelInstalling=1
genericBuild

View File

@@ -0,0 +1,84 @@
This patch makes it possible (and necessary) to specify the default
shell, xterm client, and startx script from environment variables. These
defaults are used when launching the XQuartz.app, which in turn needs to know
how to start the X server. `startx' comes from the `xinit' package,
which also has a dependency on `xorg-server', so we can't hardcode
sane defaults. If the environment variables are specified, they
override any value in the preferences settings.
When developing an installable package for XQuartz/XQuartz.app, we'll
need to set an `LSEnvironment' entry in the plist for the XQuartz.app.
(See stub.patch for more details.).
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index de82e2280..da58a5d44 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -76,8 +76,6 @@ extern int noPanoramiXExtension;
extern Bool noCompositeExtension;
#endif
-#define DEFAULT_CLIENT X11BINDIR "/xterm"
-#define DEFAULT_STARTX X11BINDIR "/startx -- " X11BINDIR "/Xquartz"
#define DEFAULT_SHELL "/bin/sh"
#define _STRINGIZE(s) #s
@@ -108,7 +106,7 @@ server_main(int argc, char **argv, char **envp);
static int
execute(const char *command);
static char *
-command_from_prefs(const char *key, const char *default_value);
+command_from_prefs(const char *key, const char *env_name, const char *default_value);
static char *pref_app_to_run;
static char *pref_login_shell;
@@ -669,14 +667,19 @@ main(int argc, char **argv, char **envp)
pid_t child1, child2;
int status;
- pref_app_to_run = command_from_prefs("app_to_run", DEFAULT_CLIENT);
+ pref_app_to_run = command_from_prefs("app_to_run",
+ "XQUARTZ_DEFAULT_CLIENT",
+ NULL);
assert(pref_app_to_run);
- pref_login_shell = command_from_prefs("login_shell", DEFAULT_SHELL);
+ pref_login_shell = command_from_prefs("login_shell",
+ "XQUARTZ_DEFAULT_SHELL",
+ DEFAULT_SHELL);
assert(pref_login_shell);
pref_startx_script = command_from_prefs("startx_script",
- DEFAULT_STARTX);
+ "XQUARTZ_DEFAULT_STARTX",
+ NULL);
assert(pref_startx_script);
/* Do the fork-twice trick to avoid having to reap zombies */
@@ -753,7 +756,7 @@ execute(const char *command)
}
static char *
-command_from_prefs(const char *key, const char *default_value)
+command_from_prefs(const char *key, const char *env_name, const char *default_value)
{
char *command = NULL;
@@ -763,6 +766,17 @@ command_from_prefs(const char *key, const char *default_value)
if (!key)
return NULL;
+ if (env_name != NULL) {
+ command = getenv(env_name);
+ if (command != NULL) {
+ return strdup(command);
+ }
+ }
+
+ if (!default_value) {
+ return NULL;
+ }
+
cfKey = CFStringCreateWithCString(NULL, key, kCFStringEncodingASCII);
if (!cfKey)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,61 @@
When the X / Xquartz server initializes, it starts the XQuartz.app and
hands-off the display FD. To start the XQuartz.app, Xquartz normally uses some
system calls to get the path of the application by app bundle id, and then
executes the Contents/MacOS/X11 script contained inside, which in turn executes
Contents/MacOS/X11.bin (the actual app).
This patch replaces that discovery technique with a simple call to
`getenv' and a hardcoded default. In order to make Xquartz work if the
app is moved, we'll need another wrapper that sets the `XQUARTZ_X11'
environment variable to point to the `X11' script.
diff --git a/hw/xquartz/mach-startup/stub.c b/hw/xquartz/mach-startup/stub.c
index 83252e805..f1974215b 100644
--- a/hw/xquartz/mach-startup/stub.c
+++ b/hw/xquartz/mach-startup/stub.c
@@ -52,7 +52,6 @@
#include "launchd_fd.h"
-static CFURLRef x11appURL;
static FSRef x11_appRef;
static pid_t x11app_pid = 0;
aslclient aslc;
@@ -60,29 +59,21 @@ aslclient aslc;
static void
set_x11_path(void)
{
- OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId),
- nil, &x11_appRef, &x11appURL);
+ unsigned char *xquartzApp = getenv("XQUARTZ_APP");
+ if (!xquartzApp) {
+ xquartzApp = "@XQUARTZ_APP@";
+ }
+
+ OSStatus osstatus = FSPathMakeRef(xquartzApp, &x11_appRef, NULL);
switch (osstatus) {
case noErr:
- if (x11appURL == NULL) {
- asl_log(aslc, NULL, ASL_LEVEL_ERR,
- "Xquartz: Invalid response from LSFindApplicationForInfo(%s)",
- kX11AppBundleId);
- exit(1);
- }
break;
- case kLSApplicationNotFoundErr:
- asl_log(aslc, NULL, ASL_LEVEL_ERR,
- "Xquartz: Unable to find application for %s",
- kX11AppBundleId);
- exit(10);
-
default:
asl_log(aslc, NULL, ASL_LEVEL_ERR,
- "Xquartz: Unable to find application for %s, error code = %d",
- kX11AppBundleId, (int)osstatus);
+ "Xquartz: Unable to find FSRef for %s, error code = %d",
+ xquartzApp, (int)osstatus);
exit(11);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
---
hw/xfree86/Makefile.am | 1 -
hw/xfree86/Makefile.in | 1 -
2 files changed, 2 deletions(-)
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 9aeaea1..dcca3b8 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -100,7 +100,6 @@ EXTRA_DIST = xorgconf.cpp
# Without logdir, X will post an error on the terminal and will not start
install-data-local:
- $(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir)
if CYGWIN
$(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a
endif
diff --git a/hw/xfree86/Makefile.in b/hw/xfree86/Makefile.in
index c4fceee..74da8f1 100644
--- a/hw/xfree86/Makefile.in
+++ b/hw/xfree86/Makefile.in
@@ -1161,7 +1161,6 @@ uninstall-am: uninstall-binPROGRAMS uninstall-local \
# Without logdir, X will post an error on the terminal and will not start
install-data-local:
- $(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir)
@CYGWIN_TRUE@ $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a
install-exec-hook:
--
2.25.4

View File

@@ -0,0 +1,621 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure --keep NIX_PATH -i perl -p cacert nix perl
# Usage: manually update tarballs.list then run: ./generate-expr-from-tarballs.pl tarballs.list
use strict;
use warnings;
use File::Basename;
use File::Spec::Functions;
use File::Temp;
my %pkgURLs;
my %pkgHashes;
my %pkgNames;
my %pkgVersions;
my %pkgRequires;
my %pkgNativeRequires;
my %pcProvides;
my %pcMap;
my %extraAttrs;
my @missingPCs = ("fontconfig", "libdrm", "libXaw", "zlib", "perl", "python3", "mkfontscale", "bdftopcf", "libxslt", "openssl", "gperf", "m4", "libinput", "libevdev", "mtdev", "xorgproto", "cairo", "gettext", "meson", "ninja", "wrapWithXFileSearchPathHook" );
$pcMap{$_} = $_ foreach @missingPCs;
$pcMap{"freetype2"} = "freetype";
$pcMap{"libpng12"} = "libpng";
$pcMap{"libpng"} = "libpng";
$pcMap{"dbus-1"} = "dbus";
$pcMap{"uuid"} = "libuuid";
$pcMap{"libudev"} = "udev";
$pcMap{"gl"} = "libGL";
$pcMap{"GL"} = "libGL";
$pcMap{"gbm"} = "libgbm";
$pcMap{"hwdata"} = "hwdata";
$pcMap{"dmx"} = "libdmx";
$pcMap{"fontenc"} = "libfontenc";
$pcMap{"fontutil"} = "fontutil";
$pcMap{"ice"} = "libICE";
$pcMap{"libfs"} = "libFS";
$pcMap{"pciaccess"} = "libpciaccess";
$pcMap{"pthread-stubs"} = "libpthreadstubs";
$pcMap{"sm"} = "libSM";
$pcMap{"x11"} = "libX11";
$pcMap{"x11-xcb"} = "libX11";
$pcMap{"xau"} = "libXau";
$pcMap{"xaw6"} = "libXaw";
$pcMap{"xaw7"} = "libXaw";
$pcMap{"xbitmaps"} = "xbitmaps";
$pcMap{"xcb-atom"} = "xcbutil";
$pcMap{"xcb-aux"} = "xcbutil";
$pcMap{"xcb-errors"} = "xcbutilerrors";
$pcMap{"xcb-event"} = "xcbutil";
$pcMap{"xcb-ewmh"} = "xcbutilwm";
$pcMap{"xcb-icccm"} = "xcbutilwm";
$pcMap{"xcb-image"} = "xcbutilimage";
$pcMap{"xcb-keysyms"} = "xcbutilkeysyms";
$pcMap{"xcb-cursor"} = "xcbutilcursor";
$pcMap{"xcb-proto"} = "xcbproto";
$pcMap{"xcb-renderutil"} = "xcbutilrenderutil";
$pcMap{"xcb-util"} = "xcbutil";
$pcMap{"xcursor"} = "libXcursor";
$pcMap{"xdmcp"} = "libXdmcp";
$pcMap{"xext"} = "libXext";
$pcMap{"xfixes"} = "libXfixes";
$pcMap{"xmu"} = "libXmu";
$pcMap{"xmuu"} = "libXmu";
$pcMap{"xpm"} = "libXpm";
$pcMap{"xrandr"} = "libXrandr";
$pcMap{"xrender"} = "libXrender";
$pcMap{"xt"} = "libXt";
$pcMap{"xtrans"} = "xtrans";
$pcMap{"xv"} = "libXv";
$pcMap{"xvmc"} = "libXvMC";
$pcMap{"xvmc-wrapper"} = "libXvMC";
$pcMap{"xxf86dga"} = "libXxf86dga";
$pcMap{"xxf86misc"} = "libXxf86misc";
$pcMap{"xxf86vm"} = "libXxf86vm";
$pcMap{"\$PIXMAN"} = "pixman";
$pcMap{"\$RENDERPROTO"} = "xorgproto";
$pcMap{"\$DRI3PROTO"} = "xorgproto";
$pcMap{"\$DRI2PROTO"} = "xorgproto";
$pcMap{"\${XKBMODULE}"} = "libxkbfile";
foreach my $mod ("xcb", "xcb-composite", "xcb-damage", "xcb-dpms", "xcb-dri2", "xcb-dri3",
"xcb-glx", "xcb-present", "xcb-randr", "xcb-record", "xcb-render", "xcb-res", "xcb-screensaver",
"xcb-shape", "xcb-shm", "xcb-sync", "xcb-xf86dri", "xcb-xfixes", "xcb-xinerama", "xcb-xinput",
"xcb-xkb", "xcb-xtest", "xcb-xv", "xcb-xvmc") {
$pcMap{$mod} = "libxcb";
}
foreach my $mod ("applewmproto", "bigreqsproto", "compositeproto", "damageproto", "dmxproto",
"dpmsproto", "dri2proto", "dri3proto", "evieproto", "fixesproto", "fontcacheproto",
"fontsproto", "glproto", "inputproto", "kbproto", "lg3dproto", "presentproto",
"printproto", "randrproto", "recordproto", "renderproto", "resourceproto", "scrnsaverproto",
"trapproto", "videoproto", "windowswmproto", "xcalibrateproto", "xcmiscproto", "xextproto",
"xf86bigfontproto", "xf86dgaproto", "xf86driproto", "xf86miscproto", "xf86rushproto",
"xf86vidmodeproto", "xineramaproto", "xproto", "xproxymngproto", "xwaylandproto") {
$pcMap{$mod} = "xorgproto";
}
my $downloadCache = "./download-cache";
mkdir $downloadCache, 0755;
while (<>) {
chomp;
my $tarball = "$_";
print "\nDOING TARBALL $tarball\n";
my $pkg;
if ($tarball =~ s/:([a-zA-Z0-9_]+)$//) {
$pkg = $1;
} else {
$tarball =~ /\/((?:(?:[A-Za-z0-9]|(?:-[^0-9])|(?:-[0-9]*[a-z]))+))[^\/]*$/;
die unless defined $1;
$pkg = $1;
$pkg =~ s/(-|[a-f0-9]{40})//g; # Remove hyphen-minus and SHA-1
#next unless $pkg eq "xcbutil";
}
$tarball =~ /\/([^\/]*)\.(tar\.(bz2|gz|xz)|tgz)$/;
my $pkgName = $1;
print " $pkg $pkgName\n";
if (defined $pkgNames{$pkg}) {
print " SKIPPING\n";
next;
}
# Split by first occurrence of hyphen followed by only numbers, ends line, another hyphen follows, or SHA-1
my ($name, $version) = split(/-(?=[.0-9]+(?:$|-)|[a-f0-9]{40})/, $pkgName, 2);
$pkgURLs{$pkg} = $tarball;
$pkgNames{$pkg} = $name;
$pkgVersions{$pkg} = $version;
my $cachePath = catdir($downloadCache, basename($tarball));
my $hash;
my $path;
if (-e $cachePath) {
$path = readlink($cachePath);
$hash = `nix-hash --type sha256 --base32 --flat $cachePath`;
}
else {
($hash, $path) = `PRINT_PATH=1 QUIET=1 nix-prefetch-url '$tarball'`;
`nix-store --realise --add-root $cachePath --indirect $path`;
}
chomp $hash;
chomp $path;
$pkgHashes{$pkg} = $hash;
print "\nunpacking $path\n";
my $tmpDir = File::Temp->newdir();
system "cd '$tmpDir' && tar xf '$path'";
die "cannot unpack `$path'" if $? != 0;
print "\n";
my $pkgDir = `echo $tmpDir/*`;
chomp $pkgDir;
my $provides = `find $pkgDir -name "*.pc.in"`;
my @provides2 = split '\n', $provides;
my @requires = ();
my @nativeRequires = ();
foreach my $pcFile (@provides2) {
my $pc = $pcFile;
$pc =~ s/.*\///;
$pc =~ s/.pc.in//;
push @{$pcProvides{$pkg}}, $pc;
print "PROVIDES $pc\n";
die "collision with $pcMap{$pc}" if defined $pcMap{$pc};
$pcMap{$pc} = $pkg;
open FOO, "<$pcFile" or die;
while (<FOO>) {
if (/Requires:(.*)/) {
my @reqs = split ' ', $1;
foreach my $req (@reqs) {
next unless $req =~ /^[a-z]+$/;
print "REQUIRE (from $pc): $req\n";
push @requires, $req;
}
}
}
close FOO;
}
my $file;
{
local $/;
open FOO, "cd '$tmpDir'/* && grep -v '^ *#' configure.ac |";
$file = <FOO>;
close FOO;
}
if ($file =~ /XAW_CHECK_XPRINT_SUPPORT/) {
push @requires, "libXaw";
}
if ($file =~ /zlib is required/ || $file =~ /AC_CHECK_LIB\(z\,/) {
push @requires, "zlib";
}
if ($file =~ /Perl is required/) {
push @requires, "perl";
}
if ($file =~ /AC_PATH_PROG\(BDFTOPCF/) {
push @nativeRequires, "bdftopcf";
}
if ($file =~ /AC_PATH_PROG\(MKFONTSCALE/ || $file =~ /XORG_FONT_REQUIRED_PROG\(MKFONTSCALE/) {
push @nativeRequires, "mkfontscale";
}
if ($file =~ /AC_PATH_PROG\(MKFONTDIR/) {
push @nativeRequires, "mkfontscale";
}
if ($file =~ /AM_PATH_PYTHON/) {
push @nativeRequires, "python3";
}
if ($file =~ /AC_PATH_PROG\(FCCACHE/) {
# Don't run fc-cache.
die if defined $extraAttrs{$pkg};
push @{$extraAttrs{$pkg}}, "preInstall = \"installFlags=(FCCACHE=true)\";";
}
my $isFont;
if ($file =~ /XORG_FONT_BDF_UTILS/) {
push @nativeRequires, "bdftopcf", "mkfontscale";
$isFont = 1;
}
if ($file =~ /XORG_FONT_SCALED_UTILS/) {
push @nativeRequires, "mkfontscale";
$isFont = 1;
}
if ($file =~ /XORG_FONT_UCS2ANY/) {
push @nativeRequires, "fontutil", "mkfontscale";
$isFont = 1;
}
if ($isFont) {
push @requires, "fontutil";
push @{$extraAttrs{$pkg}}, "configureFlags = [ \"--with-fontrootdir=\$(out)/lib/X11/fonts\" ];";
push @{$extraAttrs{$pkg}}, "postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`\$PKG_CONFIG' '';";
}
if (@@ = glob("$tmpDir/*/app-defaults/")) {
push @nativeRequires, "wrapWithXFileSearchPathHook";
}
sub process {
my $requires = shift;
my $s = shift;
$s =~ s/\[/\ /g;
$s =~ s/\]/\ /g;
$s =~ s/\,/\ /g;
foreach my $req (split / /, $s) {
next if $req eq ">=";
#next if $req =~ /^\$/;
next if $req =~ /^[0-9]/;
next if $req =~ /^\s*$/;
next if $req eq '$REQUIRED_MODULES';
next if $req eq '$REQUIRED_LIBS';
next if $req eq '$XDMCP_MODULES';
next if $req eq '$XORG_MODULES';
print "REQUIRE: $req\n";
push @{$requires}, $req;
}
}
#process \@requires, $1 while $file =~ /PKG_CHECK_MODULES\([^,]*,\s*[\[]?([^\)\[]*)/g;
process \@requires, $1 while $file =~ /PKG_CHECK_MODULES\([^,]*,([^\)\,]*)/g;
process \@requires, $1 while $file =~ /AC_SEARCH_LIBS\([^,]*,([^\)\,]*)/g;
process \@requires, $1 while $file =~ /MODULES=\"(.*)\"/g;
process \@requires, $1 while $file =~ /REQUIRED_LIBS=\"(.*)\"/g;
process \@requires, $1 while $file =~ /REQUIRED_MODULES=\"(.*)\"/g;
process \@requires, $1 while $file =~ /REQUIRES=\"(.*)\"/g;
process \@requires, $1 while $file =~ /X11_REQUIRES=\'(.*)\'/g;
process \@requires, $1 while $file =~ /XDMCP_MODULES=\"(.*)\"/g;
process \@requires, $1 while $file =~ /XORG_MODULES=\"(.*)\"/g;
process \@requires, $1 while $file =~ /NEEDED=\"(.*)\"/g;
process \@requires, $1 while $file =~ /ivo_requires=\"(.*)\"/g;
process \@requires, $1 while $file =~ /XORG_DRIVER_CHECK_EXT\([^,]*,([^\)]*)\)/g;
push @nativeRequires, "gettext" if $file =~ /USE_GETTEXT/;
push @requires, "libxslt" if $pkg =~ /libxcb/;
push @nativeRequires, "meson", "ninja" if $pkg =~ /libxcvt/;
push @nativeRequires, "m4" if $pkg =~ /xcbutil/;
push @requires, "gperf", "xorgproto" if $pkg =~ /xcbutil/;
print "REQUIRES $pkg => @requires\n";
print "NATIVE_REQUIRES $pkg => @nativeRequires\n";
$pkgRequires{$pkg} = \@requires;
$pkgNativeRequires{$pkg} = \@nativeRequires;
print "done\n";
}
print "\nWRITE OUT\n";
open OUT, ">default.nix";
print OUT "";
print OUT <<EOF;
# THIS IS A GENERATED FILE. DO NOT EDIT!
{
lib,
bdftopcf,
font-adobe-100dpi,
font-adobe-75dpi,
font-adobe-utopia-100dpi,
font-adobe-utopia-75dpi,
font-adobe-utopia-type1,
font-alias,
font-bh-ttf,
font-bh-type1,
font-encodings,
font-mutt-misc,
font-util,
gccmakedep,
ico,
imake,
libapplewm,
libdmx,
libfontenc,
libfs,
libice,
libpciaccess,
libpthread-stubs,
libsm,
libx11,
libxau,
libxaw,
libxcb,
libxcb-cursor,
libxcb-errors,
libxcb-image,
libxcb-keysyms,
libxcb-render-util,
libxcb-util,
libxcb-wm,
libxcvt,
libxcursor,
libxdmcp,
libxext,
libxfixes,
libxmu,
libxpm,
libxrandr,
libxrender,
libxt,
libxv,
libxvmc,
libxxf86dga,
libxxf86misc,
libxxf86vm,
listres,
lndir,
luit,
makedepend,
mkfontscale,
pixman,
sessreg,
smproxy,
tab-window-manager,
transset,
util-macros,
viewres,
xauth,
xbacklight,
xbitmaps,
xcb-proto,
xcmsdb,
xconsole,
xcursorgen,
xcursor-themes,
xdriinfo,
xev,
xfontsel,
xfsinfo,
xgamma,
xgc,
xhost,
xkbutils,
xkeyboard-config,
xkill,
xlsatoms,
xlsclients,
xlsfonts,
xmag,
xmessage,
xmodmap,
xmore,
xorg-cf-files,
xorg-docs,
xorgproto,
xorg-sgml-doctools,
xprop,
xrandr,
xrefresh,
xset,
xsetroot,
xsm,
xstdcmap,
xtrans,
xvinfo,
xwininfo,
xwud,
}:
self: with self; {
inherit
bdftopcf
gccmakedep
ico
imake
libdmx
libfontenc
libpciaccess
libxcb
libxcvt
listres
lndir
luit
makedepend
mkfontscale
pixman
sessreg
smproxy
transset
viewres
xauth
xbacklight
xbitmaps
xcmsdb
xconsole
xcursorgen
xdriinfo
xev
xfontsel
xfsinfo
xgamma
xgc
xhost
xkbutils
xkill
xlsatoms
xlsclients
xlsfonts
xmag
xmessage
xmodmap
xmore
xorgproto
xprop
xrandr
xrefresh
xset
xsetroot
xsm
xstdcmap
xtrans
xvinfo
xwininfo
xwud
;
encodings = font-encodings;
fontadobe100dpi = font-adobe-100dpi;
fontadobe75dpi = font-adobe-75dpi;
fontadobeutopia100dpi = font-adobe-utopia-100dpi;
fontadobeutopia75dpi = font-adobe-utopia-75dpi;
fontadobeutopiatype1 = font-adobe-utopia-type1;
fontalias = font-alias;
fontbhttf = font-bh-ttf;
fontbhtype1 = font-bh-type1;
fontmuttmisc = font-mutt-misc;
fontutil = font-util;
libAppleWM = libapplewm;
libFS = libfs;
libICE = libice;
libpthreadstubs = libpthread-stubs;
libSM = libsm;
libX11 = libx11;
libXau = libxau;
libXaw = libxaw;
libXcursor = libxcursor;
libXdmcp = libxdmcp;
libXext = libxext;
libXfixes = libxfixes;
libXmu = libxmu;
libXpm = libxpm;
libXrandr = libxrandr;
libXrender = libxrender;
libXt = libxt;
libXv = libxv;
libXvMC = libxvmc;
libXxf86dga = libxxf86dga;
libXxf86misc = libxxf86misc;
libXxf86vm = libxxf86vm;
twm = tab-window-manager;
utilmacros = util-macros;
xcbproto = xcb-proto;
xcbutilcursor = libxcb-cursor;
xcbutilerrors = libxcb-errors;
xcbutilimage = libxcb-image;
xcbutilkeysyms = libxcb-keysyms;
xcbutil = libxcb-util;
xcbutilrenderutil = libxcb-render-util;
xcbutilwm = libxcb-wm;
xkeyboardconfig = xkeyboard-config;
xcursorthemes = xcursor-themes;
xorgcffiles = xorg-cf-files;
xorgdocs = xorg-docs;
xorgsgmldoctools = xorg-sgml-doctools;
EOF
foreach my $pkg (sort (keys %pkgURLs)) {
print "$pkg\n";
my %nativeRequires = ();
my @nativeBuildInputs;
foreach my $req (sort @{$pkgNativeRequires{$pkg}}) {
if (defined $pcMap{$req}) {
# Some packages have .pc that depends on itself.
next if $pcMap{$req} eq $pkg;
if (!defined $nativeRequires{$pcMap{$req}}) {
push @nativeBuildInputs, $pcMap{$req};
$nativeRequires{$pcMap{$req}} = 1;
}
} else {
print " NOT FOUND: $req\n";
}
}
my %requires = ();
my @buildInputs;
foreach my $req (sort @{$pkgRequires{$pkg}}) {
if (defined $pcMap{$req}) {
# Some packages have .pc that depends on itself.
next if $pcMap{$req} eq $pkg;
if (!defined $requires{$pcMap{$req}}) {
push @buildInputs, $pcMap{$req};
$requires{$pcMap{$req}} = 1;
}
} else {
print " NOT FOUND: $req\n";
}
}
my $nativeBuildInputsStr = join "", map { $_ . " " } @nativeBuildInputs;
my $buildInputsStr = join "", map { $_ . " " } @buildInputs;
sub uniq {
my %seen;
my @res = ();
foreach my $s (@_) {
if (!defined $seen{$s}) {
$seen{$s} = 1;
push @res, $s;
}
}
return @res;
}
my @arguments = @buildInputs;
push @arguments, @nativeBuildInputs;
unshift @arguments, "stdenv", "pkg-config", "fetchurl";
my $argumentsStr = join ", ", uniq @arguments;
my $extraAttrsStr = "";
if (defined $extraAttrs{$pkg}) {
$extraAttrsStr = join "", map { "\n " . $_ } @{$extraAttrs{$pkg}};
}
my $pcProvidesStr = "";
if (defined $pcProvides{$pkg}) {
$pcProvidesStr = join "", map { "\"" . $_ . "\" " } (sort @{$pcProvides{$pkg}});
}
print OUT <<EOF
# THIS IS A GENERATED FILE. DO NOT EDIT!
$pkg = callPackage ({ $argumentsStr, testers }: stdenv.mkDerivation (finalAttrs: {
pname = "$pkgNames{$pkg}";
version = "$pkgVersions{$pkg}";
builder = ./builder.sh;
src = fetchurl {
url = "$pkgURLs{$pkg}";
sha256 = "$pkgHashes{$pkg}";
};
hardeningDisable = [ "bindnow" "relro" ];
strictDeps = true;
nativeBuildInputs = [ pkg-config $nativeBuildInputsStr];
buildInputs = [ $buildInputsStr];$extraAttrsStr
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
pkgConfigModules = [ $pcProvidesStr];
platforms = lib.platforms.unix;
};
})) {};
EOF
}
print OUT "}\n";
close OUT;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,119 @@
mirror://xorg/individual/app/appres-1.0.7.tar.xz
mirror://xorg/individual/app/bitmap-1.1.1.tar.xz
mirror://xorg/individual/app/editres-1.0.9.tar.xz
mirror://xorg/individual/app/fonttosfnt-1.2.4.tar.xz
mirror://xorg/individual/app/iceauth-1.0.10.tar.xz
mirror://xorg/individual/app/oclock-1.0.6.tar.xz
mirror://xorg/individual/app/setxkbmap-1.3.4.tar.xz
mirror://xorg/individual/app/x11perf-1.6.1.tar.bz2
mirror://xorg/individual/app/xcalc-1.1.2.tar.xz
mirror://xorg/individual/app/xclock-1.1.1.tar.xz
mirror://xorg/individual/app/xcompmgr-1.1.10.tar.xz
mirror://xorg/individual/app/xdm-1.1.17.tar.xz
mirror://xorg/individual/app/xdpyinfo-1.3.4.tar.xz
mirror://xorg/individual/app/xeyes-1.3.0.tar.xz
mirror://xorg/individual/app/xfd-1.1.4.tar.xz
mirror://xorg/individual/app/xfs-1.2.2.tar.xz
mirror://xorg/individual/app/xinit-1.4.4.tar.xz
mirror://xorg/individual/app/xinput-1.6.4.tar.xz
mirror://xorg/individual/app/xkbcomp-1.4.7.tar.xz
mirror://xorg/individual/app/xkbevd-1.1.6.tar.xz
mirror://xorg/individual/app/xkbprint-1.0.7.tar.xz
mirror://xorg/individual/app/xload-1.2.0.tar.xz
mirror://xorg/individual/app/xpr-1.2.0.tar.xz
mirror://xorg/individual/app/xrdb-1.2.2.tar.xz
mirror://xorg/individual/app/xtrap-1.0.3.tar.bz2
mirror://xorg/individual/app/xwd-1.0.9.tar.xz
mirror://xorg/individual/driver/xf86-input-evdev-2.11.0.tar.xz
mirror://xorg/individual/driver/xf86-input-joystick-1.6.4.tar.xz
mirror://xorg/individual/driver/xf86-input-keyboard-2.1.0.tar.xz
mirror://xorg/individual/driver/xf86-input-libinput-1.5.0.tar.xz
mirror://xorg/individual/driver/xf86-input-mouse-1.9.5.tar.xz
mirror://xorg/individual/driver/xf86-input-synaptics-1.10.0.tar.xz
mirror://xorg/individual/driver/xf86-input-vmmouse-13.2.0.tar.xz
mirror://xorg/individual/driver/xf86-input-void-1.4.2.tar.xz
mirror://xorg/individual/driver/xf86-video-amdgpu-23.0.0.tar.xz
mirror://xorg/individual/driver/xf86-video-apm-1.3.0.tar.bz2
mirror://xorg/individual/driver/xf86-video-ark-0.7.6.tar.xz
mirror://xorg/individual/driver/xf86-video-ast-1.2.0.tar.xz
mirror://xorg/individual/driver/xf86-video-ati-22.0.0.tar.xz
mirror://xorg/individual/driver/xf86-video-chips-1.5.0.tar.xz
mirror://xorg/individual/driver/xf86-video-cirrus-1.6.0.tar.xz
mirror://xorg/individual/driver/xf86-video-dummy-0.4.1.tar.xz
mirror://xorg/individual/driver/xf86-video-fbdev-0.5.1.tar.xz
mirror://xorg/individual/driver/xf86-video-geode-2.18.1.tar.xz
mirror://xorg/individual/driver/xf86-video-glide-1.2.2.tar.bz2
mirror://xorg/individual/driver/xf86-video-glint-1.2.9.tar.bz2
mirror://xorg/individual/driver/xf86-video-i128-1.4.1.tar.xz
mirror://xorg/individual/driver/xf86-video-i740-1.4.0.tar.bz2
mirror://xorg/individual/driver/xf86-video-intel-2.99.917.tar.bz2
mirror://xorg/individual/driver/xf86-video-mga-2.1.0.tar.xz
mirror://xorg/individual/driver/xf86-video-neomagic-1.3.1.tar.xz
mirror://xorg/individual/driver/xf86-video-newport-0.2.4.tar.bz2
https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/archive/3ee7cbca8f9144a3bb5be7f71ce70558f548d268/xf86-video-nouveau-3ee7cbca8f9144a3bb5be7f71ce70558f548d268.tar.bz2
mirror://xorg/individual/driver/xf86-video-nv-2.1.23.tar.xz
mirror://xorg/individual/driver/xf86-video-omap-0.4.5.tar.bz2
mirror://xorg/individual/driver/xf86-video-openchrome-0.6.0.tar.bz2
mirror://xorg/individual/driver/xf86-video-qxl-0.1.6.tar.xz
mirror://xorg/individual/driver/xf86-video-r128-6.13.0.tar.xz
mirror://xorg/individual/driver/xf86-video-s3virge-1.11.1.tar.xz
mirror://xorg/individual/driver/xf86-video-savage-2.4.1.tar.xz
mirror://xorg/individual/driver/xf86-video-siliconmotion-1.7.10.tar.xz
mirror://xorg/individual/driver/xf86-video-sis-0.12.0.tar.gz
mirror://xorg/individual/driver/xf86-video-sisusb-0.9.7.tar.bz2
mirror://xorg/individual/driver/xf86-video-suncg6-1.1.3.tar.xz
mirror://xorg/individual/driver/xf86-video-sunffb-1.2.3.tar.xz
mirror://xorg/individual/driver/xf86-video-sunleo-1.2.3.tar.xz
mirror://xorg/individual/driver/xf86-video-tdfx-1.5.0.tar.bz2
mirror://xorg/individual/driver/xf86-video-tga-1.2.2.tar.bz2
mirror://xorg/individual/driver/xf86-video-trident-1.4.0.tar.xz
mirror://xorg/individual/driver/xf86-video-v4l-0.3.0.tar.bz2
mirror://xorg/individual/driver/xf86-video-vboxvideo-1.0.1.tar.xz
mirror://xorg/individual/driver/xf86-video-vesa-2.6.0.tar.xz
mirror://xorg/individual/driver/xf86-video-vmware-13.4.0.tar.xz
mirror://xorg/individual/driver/xf86-video-voodoo-1.2.6.tar.xz
mirror://xorg/individual/driver/xf86-video-wsfb-0.4.0.tar.bz2
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-bh-lucidatypewriter-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bh-lucidatypewriter-100dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-75dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-100dpi-1.0.4.tar.xz
mirror://xorg/individual/font/font-bitstream-speedo-1.0.2.tar.gz
mirror://xorg/individual/font/font-bitstream-type1-1.0.4.tar.xz
mirror://xorg/individual/font/font-cronyx-cyrillic-1.0.4.tar.xz
mirror://xorg/individual/font/font-cursor-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-daewoo-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-dec-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-ibm-type1-1.0.4.tar.xz
mirror://xorg/individual/font/font-isas-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-jis-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-micro-misc-1.0.4.tar.xz
mirror://xorg/individual/font/font-misc-cyrillic-1.0.4.tar.xz
mirror://xorg/individual/font/font-misc-ethiopic-1.0.5.tar.xz
mirror://xorg/individual/font/font-misc-meltho-1.0.4.tar.xz
mirror://xorg/individual/font/font-misc-misc-1.1.3.tar.xz
mirror://xorg/individual/font/font-schumacher-misc-1.1.3.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-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/libXcomposite-0.4.6.tar.xz
mirror://xorg/individual/lib/libXdamage-1.1.6.tar.xz
mirror://xorg/individual/lib/libXfont-1.5.4.tar.bz2
mirror://xorg/individual/lib/libXfont2-2.0.7.tar.xz
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
mirror://xorg/individual/lib/libXp-1.0.4.tar.xz
mirror://xorg/individual/lib/libXpresent-1.0.2.tar.xz
mirror://xorg/individual/lib/libXres-1.2.3.tar.xz
mirror://xorg/individual/lib/libXScrnSaver-1.2.5.tar.xz
mirror://xorg/individual/lib/libxshmfence-1.3.3.tar.xz
mirror://xorg/individual/lib/libXTrap-1.0.1.tar.bz2
mirror://xorg/individual/lib/libXtst-1.2.5.tar.xz
mirror://xorg/individual/xserver/xorg-server-21.1.18.tar.xz

103
pkgs/servers/x11/xorg/update.py Executable file
View File

@@ -0,0 +1,103 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure --keep NIX_PATH -i python3 -p nix git nixfmt "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
# any changes.
import subprocess
import requests
from bs4 import BeautifulSoup
from packaging import version
mirror = "mirror://xorg/"
allversions = {}
print("Downloading latest version info...")
# xorg packages
for component in [
"individual/app",
"individual/data",
"individual/data/xkeyboard-config",
"individual/doc",
"individual/driver",
"individual/font",
"individual/lib",
"individual/proto",
"individual/util",
"individual/xcb",
"individual/xserver",
]:
url = "https://xorg.freedesktop.org/releases/{}/".format(component)
r = requests.get(url)
soup = BeautifulSoup(r.text, "html.parser")
for a in soup.table.find_all("a"):
href = a["href"]
if not href.endswith((".tar.bz2", ".tar.gz", ".tar.xz")):
continue
pname, rem = href.rsplit("-", 1)
ver, _, ext = rem.rsplit(".", 2)
if "rc" in ver:
continue
entry = allversions.setdefault(f"{mirror}{component}/{pname}", ([], {}))
entry[0].append(version.parse(ver))
entry[1][ver] = f"{mirror}{component}/{href}"
print("Finding updated versions...")
with open("./tarballs.list") as f:
lines_tarballs = f.readlines()
updated_tarballs = []
changes = {}
changes_text = []
for line in lines_tarballs:
line = line.rstrip("\n")
if line.startswith(mirror):
pname, rem = line.rsplit("-", 1)
if line.startswith(mirror):
ver, _, _ = rem.rsplit(".", 2)
else:
ver, _ = rem.rsplit(".", 1)
if pname not in allversions:
print("# WARNING: no version found for {}".format(pname))
continue
highest = max(allversions[pname][0])
if highest > version.parse(ver):
line = allversions[pname][1][str(highest)]
text = f"{pname.split('/')[-1]}: {ver} -> {str(highest)}"
print(f" Updating {text}")
changes[pname] = line
changes_text.append(text)
updated_tarballs.append(line)
if len(changes) == 0:
print("No updates found")
exit()
print("Updating tarballs.list...")
with open("./tarballs.list", "w") as f:
f.writelines(f'{tarball}\n' for tarball in updated_tarballs)
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...")
subprocess.run(["git", "add", "default.nix", "tarballs.list"], check=True)
subprocess.run(["git", "commit", "-mxorg.*: update\n\n%s" % "\n".join(changes_text)], check=True)

View File

@@ -0,0 +1,28 @@
--- a/src/uxa/intel_dri.c
+++ b/src/uxa/intel_dri.c
@@ -1540,8 +1540,10 @@
return has_i830_dri() ? "i830" : "i915";
else if (INTEL_INFO(intel)->gen < 040)
return "i915";
+ else if (INTEL_INFO(intel)->gen < 0100)
+ return "crocus";
else
- return "i965";
+ return "iris";
}
return s;
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -3707,8 +3707,10 @@
return has_i830_dri() ? "i830" : "i915";
else if (sna->kgem.gen < 040)
return "i915";
+ else if (sna->kgem.gen < 0100)
+ return "crocus";
else
- return "i965";
+ return "iris";
}
return s;

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
m4,
libxcb,
xcbutil,
libX11,
}:
stdenv.mkDerivation rec {
version = "1.3";
pname = "xcb-util-xrm";
src = fetchurl {
url = "https://github.com/Airblader/xcb-util-xrm/releases/download/v${version}/${pname}-${version}.tar.bz2";
sha256 = "118cj1ybw86pgw0l5whn9vbg5n5b0ijcpx295mwahzi004vz671h";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
m4
];
doCheck = true;
buildInputs = [
libxcb
xcbutil
libX11
];
meta = with lib; {
description = "XCB utility functions for the X resource manager";
homepage = "https://github.com/Airblader/xcb-util-xrm";
license = licenses.mit; # X11 variant
platforms = with platforms; unix;
};
}

View File

@@ -0,0 +1,146 @@
{
dri-pkgconfig-stub,
egl-wayland,
bash,
libepoxy,
fetchurl,
fontutil,
lib,
libdecor,
libgbm,
libei,
libGL,
libGLU,
libX11,
libXau,
libXaw,
libXdmcp,
libXext,
libXfixes,
libXfont2,
libXmu,
libXpm,
libXrender,
libXres,
libXt,
libdrm,
libtirpc,
# Disable withLibunwind as LLVM's libunwind will conflict and does not support the right symbols.
withLibunwind ? !(stdenv.hostPlatform.useLLVM or false),
libunwind,
libxcb,
libxkbfile,
libxshmfence,
libxcvt,
mesa-gl-headers,
meson,
ninja,
openssl,
pkg-config,
pixman,
stdenv,
systemd,
wayland,
wayland-protocols,
wayland-scanner,
xkbcomp,
xkeyboard_config,
xorgproto,
xtrans,
zlib,
defaultFontPath ? "",
gitUpdater,
}:
stdenv.mkDerivation rec {
pname = "xwayland";
version = "24.1.8";
src = fetchurl {
url = "mirror://xorg/individual/xserver/${pname}-${version}.tar.xz";
hash = "sha256-yJCNV8jtnOuCk8Frp61a9SLvrxun5R+eTPPAd00ZmQc=";
};
postPatch = ''
substituteInPlace os/utils.c \
--replace-fail '/bin/sh' '${lib.getExe' bash "sh"}'
'';
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
pkg-config
meson
ninja
wayland-scanner
];
buildInputs = [
dri-pkgconfig-stub
egl-wayland
libdecor
libgbm
libepoxy
libei
fontutil
libGL
libGLU
libX11
libXau
libXaw
libXdmcp
libXext
libXfixes
libXfont2
libXmu
libXpm
libXrender
libXres
libXt
libdrm
libtirpc
libxcb
libxkbfile
libxshmfence
libxcvt
mesa-gl-headers
openssl
pixman
systemd
wayland
wayland-protocols
xkbcomp
xorgproto
xtrans
zlib
]
++ lib.optionals withLibunwind [
libunwind
];
mesonFlags = [
(lib.mesonBool "xcsecurity" true)
(lib.mesonOption "default_font_path" defaultFontPath)
(lib.mesonOption "xkb_bin_dir" "${xkbcomp}/bin")
(lib.mesonOption "xkb_dir" "${xkeyboard_config}/etc/X11/xkb")
(lib.mesonOption "xkb_output_dir" "${placeholder "out"}/share/X11/xkb/compiled")
(lib.mesonBool "libunwind" withLibunwind)
];
passthru.updateScript = gitUpdater {
# No nicer place to find latest release.
url = "https://gitlab.freedesktop.org/xorg/xserver.git";
rev-prefix = "xwayland-";
};
meta = with lib; {
description = "X server for interfacing X11 apps with the Wayland protocol";
homepage = "https://wayland.freedesktop.org/xserver.html";
license = licenses.mit;
mainProgram = "Xwayland";
maintainers = with maintainers; [
emantor
k900
];
platforms = platforms.linux;
};
}