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

View File

@@ -0,0 +1,74 @@
diff --git a/meson.build b/meson.build
index 8e28f2a..c8d1dc9 100644
--- a/meson.build
+++ b/meson.build
@@ -16,7 +16,7 @@ config_h.set_quoted('PACKAGE', meson.project_name())
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
cc_args = []
-if host_machine.system() not in ['freebsd', 'openbsd']
+if host_machine.system() not in ['darwin', 'freebsd', 'openbsd']
cc_args += ['-D_POSIX_C_SOURCE=200809L']
endif
add_project_arguments(cc_args, language: 'c')
@@ -52,7 +52,7 @@ foreach f: have_funcs
endforeach
config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>'))
have_broken_msg_cmsg_cloexec = false
-if host_machine.system() == 'freebsd'
+if host_machine.system() in ['darwin', 'freebsd']
have_broken_msg_cmsg_cloexec = not cc.compiles('''
#include <sys/param.h> /* To get __FreeBSD_version. */
#if __FreeBSD_version < 1300502 || \
@@ -69,7 +69,7 @@ endif
config_h.set10('HAVE_BROKEN_MSG_CMSG_CLOEXEC', have_broken_msg_cmsg_cloexec)
if get_option('libraries')
- if host_machine.system() in ['freebsd', 'openbsd']
+ if host_machine.system() in ['darwin', 'freebsd', 'openbsd']
# When building for FreeBSD, epoll(7) is provided by a userspace
# wrapper around kqueue(2).
epoll_dep = dependency('epoll-shim')
diff --git a/src/event-loop.c b/src/event-loop.c
index 45222f7..fb3b464 100644
--- a/src/event-loop.c
+++ b/src/event-loop.c
@@ -49,6 +49,13 @@
#define TIMER_REMOVED -2
+#ifdef __APPLE__
+struct itimerspec {
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+#endif
+
struct wl_event_loop;
struct wl_event_source_interface;
struct wl_event_source_timer;
diff --git a/src/wayland-os.c b/src/wayland-os.c
index f00ead4..4dc01d0 100644
--- a/src/wayland-os.c
+++ b/src/wayland-os.c
@@ -75,17 +75,19 @@ wl_os_socket_cloexec(int domain, int type, int protocol)
{
int fd;
+#ifdef SOCK_CLOEXEC
fd = wl_socket(domain, type | SOCK_CLOEXEC, protocol);
if (fd >= 0)
return fd;
if (errno != EINVAL)
return -1;
+#endif
fd = wl_socket(domain, type, protocol);
return set_cloexec_or_close(fd);
}
-#if defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
int
wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)
{

View File

@@ -0,0 +1,123 @@
{
lib,
stdenv,
fetchurl,
meson,
pkg-config,
ninja,
wayland-scanner,
withTests ? stdenv.hostPlatform.isLinux,
libffi,
epoll-shim,
withDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform,
graphviz-nox,
doxygen,
libxslt,
xmlto,
python3,
docbook_xsl,
docbook_xml_dtd_45,
docbook_xml_dtd_42,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wayland";
version = "1.24.0";
src = fetchurl {
url =
with finalAttrs;
"https://gitlab.freedesktop.org/wayland/wayland/-/releases/${version}/downloads/${pname}-${version}.tar.xz";
hash = "sha256-gokkh6Aa1nszTsqDtUMXp8hqA6ic+trP71IR8RpdBTY=";
};
patches = [
./darwin.patch
];
postPatch = lib.optionalString withDocumentation ''
patchShebangs doc/doxygen/gen-doxygen.py
'';
outputs = [
"out"
"dev"
]
++ lib.optionals withDocumentation [
"doc"
"man"
];
separateDebugInfo = true;
mesonFlags = [
(lib.mesonBool "documentation" withDocumentation)
(lib.mesonBool "tests" withTests)
(lib.mesonBool "scanner" false) # wayland-scanner is a separate derivation
];
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
meson
pkg-config
ninja
wayland-scanner
]
++ lib.optionals withDocumentation [
(graphviz-nox.override { pango = null; }) # To avoid an infinite recursion
doxygen
libxslt
xmlto
python3
docbook_xml_dtd_45
docbook_xsl
];
buildInputs = [
libffi
]
++ lib.optionals (!stdenv.hostPlatform.isLinux) [
epoll-shim
]
++ lib.optionals withDocumentation [
docbook_xsl
docbook_xml_dtd_45
docbook_xml_dtd_42
];
passthru = {
tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
};
meta = with lib; {
description = "Core Wayland window system code and protocol";
longDescription = ''
Wayland is a project to define a protocol for a compositor to talk to its
clients as well as a library implementation of the protocol.
The wayland protocol is essentially only about input handling and buffer
management, but also handles drag and drop, selections, window management
and other interactions that must go through the compositor (but not
rendering).
'';
homepage = "https://wayland.freedesktop.org/";
license = licenses.mit; # Expat version
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin; # requires more work: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/481
maintainers = with maintainers; [
codyopel
qyliss
];
pkgConfigModules = [
"wayland-client"
"wayland-cursor"
"wayland-egl"
"wayland-egl-backend"
"wayland-server"
];
};
})

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
meson,
ninja,
wayland-scanner,
python3,
wayland,
gitUpdater,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wayland-protocols";
version = "1.45";
doCheck =
stdenv.hostPlatform == stdenv.buildPlatform
&&
# https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48
stdenv.hostPlatform.linker == "bfd"
&& lib.meta.availableOn stdenv.hostPlatform wayland;
src = fetchurl {
url = "https://gitlab.freedesktop.org/wayland/${finalAttrs.pname}/-/releases/${finalAttrs.version}/downloads/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
hash = "sha256-TSsqnj4JnQF9yBB78cM00nu4fZ5K/xmgyNhW0XzUHvA=";
};
postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
patchShebangs tests/
'';
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
meson
ninja
wayland-scanner
];
nativeCheckInputs = [
python3
wayland
];
checkInputs = [ wayland ];
strictDeps = true;
mesonFlags = [ "-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}" ];
meta = {
description = "Wayland protocol extensions";
longDescription = ''
wayland-protocols contains Wayland protocols that add functionality not
available in the Wayland core protocol. Such protocols either add
completely new functionality, or extend the functionality of some other
protocol either in Wayland core, or some other protocol in
wayland-protocols.
'';
homepage = "https://gitlab.freedesktop.org/wayland/wayland-protocols";
license = lib.licenses.mit; # Expat version
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ wineee ];
pkgConfigModules = [ "wayland-protocols" ];
};
passthru.updateScript = gitUpdater {
url = "https://gitlab.freedesktop.org/wayland/wayland-protocols.git";
};
passthru.version = finalAttrs.version;
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
};
})

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
wayland,
meson,
pkg-config,
ninja,
wayland-scanner,
expat,
libxml2,
}:
stdenv.mkDerivation {
pname = "wayland-scanner";
inherit (wayland) version src;
outputs = [
"out"
"bin"
"dev"
];
separateDebugInfo = true;
mesonFlags = [
(lib.mesonBool "documentation" false)
(lib.mesonBool "libraries" false)
(lib.mesonBool "tests" false)
];
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
meson
pkg-config
ninja
]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) wayland-scanner;
buildInputs = [
expat
libxml2
];
meta = with lib; {
inherit (wayland.meta) homepage license maintainers;
mainProgram = "wayland-scanner";
description = "C code generator for Wayland protocol XML files";
platforms = platforms.unix;
};
}