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,58 @@
{
lib,
buildGoModule,
fetchFromGitHub,
runtimeShell,
udevCheckHook,
}:
buildGoModule rec {
pname = "xe-guest-utilities";
version = "8.4.0";
src = fetchFromGitHub {
owner = "xenserver";
repo = "xe-guest-utilities";
rev = "v${version}";
hash = "sha256-LpZx+Km2qRywYK/eFLP3aCDku6K6HC4+MzEODH+8Gvs=";
};
nativeBuildInputs = [
udevCheckHook
];
doInstallCheck = true;
deleteVendor = true;
vendorHash = "sha256-X/BI+ZhoqCGCmJfccyEBVgZc70aRTp3rL5j+rBWG5fE=";
postPatch = ''
substituteInPlace mk/xen-vcpu-hotplug.rules \
--replace "/bin/sh" "${runtimeShell}"
'';
buildPhase = ''
runHook preBuild
make RELEASE=nixpkgs
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dt "$out"/bin build/stage/usr/{,s}bin/*
install -Dt "$out"/etc/udev/rules.d build/stage/etc/udev/rules.d/*
runHook postInstall
'';
meta = {
description = "XenServer guest utilities";
homepage = "https://github.com/xenserver/xe-guest-utilities";
license = lib.licenses.bsd2;
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,28 @@
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "xe";
version = "1.0";
src = fetchFromGitHub {
owner = "leahneukirchen";
repo = "xe";
tag = "v${version}";
sha256 = "sha256-yek6flBhgjSeN3M695BglUfcbnUGp3skzWT2W/BxW8Y=";
};
makeFlags = [ "PREFIX=$(out)" ];
meta = {
description = "Simple xargs and apply replacement";
homepage = "https://github.com/leahneukirchen/xe";
license = lib.licenses.cc0;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.pbsds ];
mainProgram = "xe";
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchurl,
imake,
gccmakedep,
libXt,
libXext,
}:
stdenv.mkDerivation rec {
pname = "xearth";
version = "1.1";
src = fetchurl {
url = "http://xearth.org/${pname}-${version}.tar.gz";
hash = "sha256-vLFAfMNbP23TYGssYHInO2qRLL2e0a4i+y0maUVBMJw=";
};
postPatch = "sed -i '48i #include <stdlib.h>' gifout.c";
nativeBuildInputs = [
imake
gccmakedep
];
buildInputs = [
libXt
libXext
];
installFlags = [
"DESTDIR=$(out)/"
"BINDIR=bin"
"MANDIR=man/man1"
];
installTargets = [
"install"
"install.man"
];
meta = {
description = "Set the X root window to an image of the Earth";
mainProgram = "xearth";
homepage = "https://xearth.org";
longDescription = ''
Xearth sets the X root window to an image of the Earth, as seen from your favorite vantage point in space,
correctly shaded for the current position of the Sun.
By default, xearth updates the displayed image every five minutes.
'';
maintainers = with lib.maintainers; [ mafo ];
license = {
fullName = "xearth license";
url = "https://xearth.org/copyright.html";
free = true;
};
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/xed/meson.build b/xed/meson.build
index 7525bad..ae0814e 100644
--- a/xed/meson.build
+++ b/xed/meson.build
@@ -143,7 +143,7 @@ libxed = library(
dependencies: xed_deps,
include_directories: include_dirs,
install: true,
- install_dir: join_paths(libdir, 'xed')
+ install_dir: join_paths(prefix, libdir, 'xed')
)
install_headers(

View File

@@ -0,0 +1,74 @@
{
stdenv,
lib,
fetchFromGitHub,
libxml2,
libpeas,
glib,
gtk3,
gtksourceview4,
gspell,
xapp,
pkg-config,
python3,
meson,
ninja,
versionCheckHook,
wrapGAppsHook3,
intltool,
itstool,
}:
stdenv.mkDerivation rec {
pname = "xed-editor";
version = "3.8.4";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "xed";
rev = version;
hash = "sha256-pI9gjAA5dn0QwZKGungQ1xpQJmnfCxmqWR0VBEQ5v84=";
};
patches = [
# We patch gobject-introspection and meson to store absolute paths to libraries in typelibs
# but that requires the install_dir is an absolute path.
./correct-gir-lib-path.patch
];
nativeBuildInputs = [
meson
pkg-config
intltool
itstool
ninja
python3
versionCheckHook
wrapGAppsHook3
];
buildInputs = [
libxml2
glib
gtk3
gtksourceview4
libpeas
gspell
xapp
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/xed";
meta = with lib; {
description = "Light weight text editor from Linux Mint";
homepage = "https://github.com/linuxmint/xed";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [
tu-maurice
bobby285271
];
mainProgram = "xed";
};
}

View File

@@ -0,0 +1,99 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
llvmPackages,
installShellFiles,
nix-update-script,
}:
let
# mbuild is a custom build system used only to build xed
mbuild = python3Packages.buildPythonPackage rec {
pname = "mbuild";
version = "2024.11.04";
pyproject = true;
src = fetchFromGitHub {
owner = "intelxed";
repo = "mbuild";
tag = "v${version}";
hash = "sha256-iQVykBG3tEPxI1HmqBkvO1q+K8vi64qBfVC63/rcTOk=";
};
build-system = with python3Packages; [ setuptools ];
meta = {
description = "Python-based build system used for building XED";
homepage = "https://github.com/intelxed/mbuild";
license = lib.licenses.asl20;
};
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "xed";
version = "2025.06.08";
src = fetchFromGitHub {
owner = "intelxed";
repo = "xed";
tag = "v${finalAttrs.version}";
hash = "sha256-FXVWCq7ykuSsVx8iB7WkFD7DDq6o/4bgsS0YJQWE+XM=";
};
postPatch = ''
patchShebangs mfile.py
'';
nativeBuildInputs = [
mbuild
installShellFiles
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ llvmPackages.bintools ];
buildPhase = ''
runHook preBuild
# this will build, test and install
./mfile.py test --prefix $out
runHook postBuild
'';
checkPhase = ''
runHook preCheck
./mfile.py examples
runHook postCheck
'';
installPhase = ''
runHook preInstall
installBin obj/wkit/examples/obj/xed
runHook postInstall
'';
passthru = {
inherit mbuild;
updateScript = nix-update-script {
extraArgs = [
"--subpackage"
"mbuild"
];
};
};
meta = {
broken = stdenv.hostPlatform.isAarch64;
description = "Intel X86 Encoder Decoder (Intel XED)";
homepage = "https://intelxed.github.io/";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ arturcygan ];
};
})

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchFromGitLab,
autoreconfHook,
pkg-config,
utilmacros,
libX11,
libXaw,
libXmu,
libXt,
}:
stdenv.mkDerivation rec {
pname = "xedit";
version = "1.2.4";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "xorg/app";
repo = "xedit";
rev = "${pname}-${version}";
sha256 = "sha256-0vP+aR8QBXAqbULOLEs7QXsehk18BJ405qoelrcepwE=";
};
# ./lisp/mathimp.c:493:10: error: implicitly declaring library function 'finite' with type 'int (double)'
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
for i in $(find . -type f -name "*.c"); do
substituteInPlace $i --replace "finite" "isfinite"
done
'';
nativeBuildInputs = [
autoreconfHook
pkg-config
utilmacros
];
buildInputs = [
libX11
libXaw
libXmu
libXt
];
configureFlags = [
"--with-lispdir=$out/share/X11/xedit/lisp"
"--with-appdefaultdir=$out/share/X11/app-defaults"
];
meta = with lib; {
description = "Simple graphical text editor using Athena Widgets (Xaw)";
homepage = "https://gitlab.freedesktop.org/xorg/app/xedit";
license = with licenses; [ mit ];
maintainers = with maintainers; [ shamilton ];
platforms = platforms.unix;
# never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "xedit";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
rustPlatform,
fetchFromGitHub,
writers,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "xee";
version = "0.1.6";
src = fetchFromGitHub {
owner = "Paligo";
repo = "xee";
tag = "xee-v${finalAttrs.version}";
hash = "sha256-AU1x2Y2oDaUi4XliOf3GxJCwPv/OMTTUE2p/SOJtM2k=";
};
cargoHash = "sha256-30OXowgIVSXMFEZVM74kwU8mdDuXVngsISyVQ0MB+VQ=";
cargoBuildFlags = [
"--package"
"xee"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "XML Execution Engine written in Rust";
longDescription = ''
Load XML documents, issue XPath expressions against them, including in
a REPL, and pretty-print XML documents. A Swiss Army knife CLI for XML.
'';
homepage = "https://github.com/Paligo/xee";
changelog = "https://github.com/Paligo/xee/releases/tag/xee-v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pbsds ];
mainProgram = "xee";
};
})

View File

@@ -0,0 +1,196 @@
{
lib,
SDL2,
SDL2_image,
fetchFromGitHub,
gettext,
git,
glib,
gtk3,
cmake,
curl,
libdrm,
libepoxy,
libpcap,
libsamplerate,
libslirp,
libgbm,
vulkan-headers,
vulkan-loader,
meson,
ninja,
openssl,
perl,
pkg-config,
python3Packages,
stdenv,
vte,
which,
wrapGAppsHook3,
cacert,
darwin,
apple-sdk_12,
desktopToDarwinBundle,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xemu";
version = "0.8.106";
src = fetchFromGitHub {
owner = "xemu-project";
repo = "xemu";
tag = "v${finalAttrs.version}";
hash = "sha256-QlhK86yj0ZvhbXfZyoHkpgxC9rZx/XRZ1LdFNFH1LMk=";
nativeBuildInputs = [
git
meson
];
# also fetch required git submodules
postFetch = ''
cd "$out"
export NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
meson subprojects download \
SPIRV-Reflect VulkanMemoryAllocator berkeley-softfloat-3 berkeley-testfloat-3 genconfig glslang imgui \
implot json keycodemapdb nv2a_vsh_cpu tomlplusplus volk xxhash || true
find subprojects -type d -name .git -prune -execdir rm -r {} +
'';
};
__structuredAttrs = true;
nativeBuildInputs = [
SDL2
meson
cmake
ninja
perl
pkg-config
which
wrapGAppsHook3
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.sigtool
desktopToDarwinBundle
]
++ (with python3Packages; [
python
pyyaml
distlib
]);
buildInputs = [
SDL2
SDL2_image
gettext
glib
gtk3
curl
libepoxy
libpcap
libsamplerate
libslirp
openssl
vulkan-headers
vulkan-loader
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libdrm
libgbm
vte
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_12
];
configureFlags = [
"--disable-strip"
"--target-list=i386-softmmu"
"--disable-werror"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# As seen in the official build script ($src/build.sh)
"--disable-cocoa"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
"--enable-hvf"
];
buildFlags = [ "qemu-system-i386" ];
separateDebugInfo = true;
dontUseMesonConfigure = true;
dontUseCmakeConfigure = true;
setOutputFlags = false;
strictDeps = true;
postPatch = ''
patchShebangs scripts
substituteInPlace ./scripts/xemu-version.sh \
--replace-fail 'date -u' "date -d @$SOURCE_DATE_EPOCH '+%Y-%m-%d %H:%M:%S'"
'';
preConfigure = ''
configureFlagsArray+=("--extra-cflags=-DXBOX=1 -Wno-error=redundant-decls")
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
configureFlagsArray+=("-Wno-implicit-function-declaration")
''
+ ''
# When the data below can't be obtained through git, the build process tries
# to run `XEMU_COMMIT=$(cat XEMU_COMMIT)` (and similar)
echo '${finalAttrs.version}' > XEMU_VERSION
'';
preBuild = ''
cd build
substituteInPlace ./build.ninja --replace /usr/bin/env $(which env)
'';
postBuild =
lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
# Needed for HVF acceleration
codesign --entitlements $src/accel/hvf/entitlements.plist -f -s - qemu-system-i386-unsigned
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mv qemu-system-i386-unsigned qemu-system-i386
'';
installPhase = ''
runHook preInstall
install -Dm755 -T qemu-system-i386 $out/bin/xemu
for resolution in 16x16 24x24 32x32 48x48 128x128 256x256 512x512
do
install -Dm644 -T ../ui/icons/xemu_$resolution.png \
$out/share/icons/hicolor/$resolution/apps/xemu.png
done
install -Dm644 -T ../ui/xemu.desktop $out/share/applications/xemu.desktop
runHook postInstall
'';
meta = {
homepage = "https://xemu.app/";
description = "Original Xbox emulator";
longDescription = ''
A free and open-source application that emulates the original Microsoft
Xbox game console, enabling people to play their original Xbox games on
Windows, macOS, and Linux systems.
'';
changelog = "https://github.com/xemu-project/xemu/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl2Plus;
mainProgram = "xemu";
maintainers = with lib.maintainers; [
marcin-serwin
matteopacini
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
fetchFromGitLab,
rustPlatform,
pkg-config,
xen,
}:
rustPlatform.buildRustPackage {
pname = "xen-guest-agent";
version = "0.4.0-unstable-2024-05-31";
src = fetchFromGitLab {
owner = "xen-project";
repo = "xen-guest-agent";
rev = "03aaadbe030f303b1503e172ee2abb6d0cab7ac6";
hash = "sha256-OhzRsRwDvt0Ov+nLxQSP87G3RDYSLREMz2w9pPtSUYg=";
};
cargoHash = "sha256-o4eQ1ORI7Rw097m6CsvWLeCW5Dtl75uRXi/tcv/Xq0Q=";
nativeBuildInputs = [
rustPlatform.bindgenHook
pkg-config
];
buildInputs = [ xen ];
postInstall =
# Install the sample systemd service.
''
mkdir --parents $out/lib/systemd/system
cp $src/startup/xen-guest-agent.service $out/lib/systemd/system
substituteInPlace $out/lib/systemd/system/xen-guest-agent.service \
--replace-fail "/usr/sbin/xen-guest-agent" "$out/bin/xen-guest-agent"
'';
postFixup =
# Add the Xen libraries in the runpath so the guest agent can find libxenstore.
"patchelf $out/bin/xen-guest-agent --add-rpath ${xen}/lib";
meta = {
description = "Xen agent running in Linux/BSDs (POSIX) VMs";
homepage = "https://gitlab.com/xen-project/xen-guest-agent";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.unix;
teams = [ lib.teams.xen ];
mainProgram = "xen-guest-agent";
};
}

View File

@@ -0,0 +1,35 @@
From 7f802ceac03252ad5182ee8c69ebb01da24a307c Mon Sep 17 00:00:00 2001
From: Fernando Rodrigues <alpha@sigmasquadron.net>
Date: Fri, 4 Jul 2025 18:07:01 +0000
Subject: [PATCH 1/2] xen/Makefile: patch .efi output directory
This is necessary so the build does not fail when Xen tries to install
.efi files to $boot/efi/nixos and panics when the directory doesn't
exist. It also has the benefit of installing the files in a location
that is easier to access.
Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
diff --git a/xen/Makefile b/xen/Makefile
index 6bf0b0ea9e..907cd89f7e 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -527,6 +527,6 @@ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
$(if $(efi-strip-opt), \
$(STRIP) $(efi-strip-opt) -p -o $(TARGET).efi.stripped $(TARGET).efi && \
- $(INSTALL_DATA) $(TARGET).efi.stripped $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi ||) \
- $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \
+ $(INSTALL_DATA) $(TARGET).efi.stripped $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).efi ||) \
+ $(INSTALL_DATA) $(TARGET).efi $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then \
echo 'EFI installation only partially done (EFI_VENDOR not set)' >&2; \
@@ -560,5 +560,5 @@ _uninstall:
rm -f $(D)$(EFI_DIR)/$(T).efi
if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \
- rm -f $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \
+ rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
fi
--
2.49.0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,431 @@
{
lib,
stdenv,
testers,
fetchgit,
fetchpatch,
replaceVars,
# Xen
acpica-tools,
autoPatchelfHook,
binutils-unwrapped-all-targets,
bison,
bzip2,
cmake,
dev86,
e2fsprogs,
flex,
libnl,
libuuid,
lzo,
ncurses,
ocamlPackages,
perl,
pkg-config,
python3Packages,
systemd,
xz,
yajl,
zlib,
zstd,
# Optional Components
withFlask ? false,
checkpolicy,
withIPXE ? true,
ipxe,
withOVMF ? true,
OVMF,
withSeaBIOS ? true,
seabios-qemu,
# Documentation
pandoc,
# Scripts
bash,
bridge-utils,
coreutils,
diffutils,
drbd,
gawk,
gnugrep,
gnused,
inetutils,
iproute2,
iptables,
kmod,
multipath-tools,
nbd,
openiscsi,
openvswitch,
psmisc,
util-linux,
which,
}:
let
inherit (lib)
enableFeature
genAttrs
getExe
getExe'
licenses
optionalString
optionals
systems
teams
versionOlder
versions
warn
;
inherit (systems.inspect.patterns) isLinux isAarch64;
inherit (licenses)
cc-by-40
gpl2Only
lgpl21Only
mit
;
# Mark versions older than minSupportedVersion as EOL.
minSupportedVersion = "4.17";
scriptDeps =
let
mkTools = pkg: tools: genAttrs tools (tool: getExe' pkg tool);
in
(genAttrs [
"CONFIG_DIR"
"CONFIG_LEAF_DIR"
"LIBEXEC_BIN"
"XEN_LOG_DIR"
"XEN_RUN_DIR"
"XEN_SCRIPT_DIR"
"qemu_xen_systemd"
"sbindir"
] (_: null))
// (mkTools coreutils [
"basename"
"cat"
"cp"
"cut"
"dirname"
"head"
"ls"
"mkdir"
"mktemp"
"readlink"
"rm"
"seq"
"sleep"
"stat"
])
// (mkTools drbd [
"drbdadm"
"drbdsetup"
])
// (mkTools gnugrep [
"egrep"
"grep"
])
// (mkTools iproute2 [
"bridge"
"ip"
"tc"
])
// (mkTools iptables [
"arptables"
"ip6tables"
"iptables"
])
// (mkTools kmod [
"modinfo"
"modprobe"
"rmmod"
])
// (mkTools libnl [
"nl-qdisc-add"
"nl-qdisc-delete"
"nl-qdisc-list"
])
// (mkTools util-linux [
"flock"
"logger"
"losetup"
"prlimit"
])
// {
awk = getExe' gawk "awk";
brctl = getExe bridge-utils;
diff = getExe' diffutils "diff";
ifconfig = getExe' inetutils "ifconfig";
iscsiadm = getExe' openiscsi "iscsiadm";
killall = getExe' psmisc "killall";
multipath = getExe' multipath-tools "multipath";
nbd-client = getExe' nbd "nbd-client";
ovs-vsctl = getExe' openvswitch "ovs-vsctl";
sed = getExe gnused;
systemd-notify = getExe' systemd "systemd-notify";
which = getExe which;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "xen";
version = "4.20.1";
# This attribute can be overriden to correct the file paths in
# `passthru` when building an unstable Xen.
upstreamVersion = finalAttrs.version;
# Useful for further identifying downstream Xen variants. (i.e. Qubes)
vendor = "nixos";
patches = [
./0001-makefile-efi-output-directory.patch
(replaceVars ./0002-scripts-external-executable-calls.patch scriptDeps)
# XSA 472
(fetchpatch {
url = "https://xenbits.xen.org/xsa/xsa472-1.patch";
hash = "sha256-6k/X7KFno9uBG0mUtJxl7TMavaRs2Xlj9JlW9ai6p0k=";
})
(fetchpatch {
url = "https://xenbits.xen.org/xsa/xsa472-2.patch";
hash = "sha256-BisdztU9Wa5nIGmHo4IikqYPHdEhBehHaNqj1IuBe6I=";
})
(fetchpatch {
url = "https://xenbits.xen.org/xsa/xsa472-3.patch";
hash = "sha256-rikOofQeuLNMBkdQS3xzmwh7BlgMOTMSsQcAOEzNOso=";
})
# XSA 473
(fetchpatch {
url = "https://xenbits.xen.org/xsa/xsa473-1.patch";
hash = "sha256-594tTalWcGJSLj3++4QB/ADkHH1qJNrdvg7FG6kOuB8=";
})
(fetchpatch {
url = "https://xenbits.xen.org/xsa/xsa473-2.patch";
hash = "sha256-tGuIGxJFBXbckIruSUeTyrM6GabdIj6Pr3cVxeDvNNY=";
})
];
outputs = [
"out"
"man"
"doc"
"dev"
"boot"
];
src = fetchgit {
url = "https://xenbits.xenproject.org/git-http/xen.git";
rev = "08f043965a7b1047aabd6d81da6b031465f2d797";
hash = "sha256-a4dIJBY5aeznXPoI8nSipMgimmww7ejoQ1GE28Gq13o=";
};
strictDeps = true;
nativeBuildInputs = [
acpica-tools
autoPatchelfHook
bison
cmake
dev86
flex
pandoc
perl
pkg-config
# oxenstored
ocamlPackages.findlib
ocamlPackages.ocaml
]
++ (with python3Packages; [
python
setuptools
wrapPython
]);
buildInputs = [
bash
bzip2
e2fsprogs.dev
libnl
libuuid
lzo
ncurses
xz
yajl
zlib
zstd
]
++ optionals withFlask [ checkpolicy ]
++ optionals (versionOlder finalAttrs.version "4.19") [ systemd ];
configureFlags = [
"--enable-systemd"
"--disable-qemu-traditional"
"--with-system-qemu"
(if withSeaBIOS then "--with-system-seabios=${seabios-qemu.firmware}" else "--disable-seabios")
(if withOVMF then "--with-system-ovmf=${OVMF.mergedFirmware}" else "--disable-ovmf")
(if withIPXE then "--with-system-ipxe=${ipxe.firmware}" else "--disable-ipxe")
(enableFeature withFlask "xsmpolicy")
];
makeFlags = [
"SUBSYSTEMS=${toString finalAttrs.buildFlags}"
"PREFIX=$(out)"
"BASH_COMPLETION_DIR=$(PREFIX)/share/bash-completion/completions"
"XEN_WHOAMI=${finalAttrs.pname}"
"XEN_DOMAIN=${finalAttrs.vendor}"
"GIT=${getExe' coreutils "false"}"
"WGET=${getExe' coreutils "false"}"
"EFI_VENDOR=${finalAttrs.vendor}"
"INSTALL_EFI_STRIP=1"
"LD=${getExe' binutils-unwrapped-all-targets "ld"}"
]
# These flags set the CONFIG_* options in /boot/xen.config
# and define if the default policy file is built. However,
# the Flask binaries always get compiled by default.
++ optionals withFlask [
"XSM_ENABLE=y"
"FLASK_ENABLE=y"
];
buildFlags = [
"xen"
"tools"
"docs"
];
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=maybe-uninitialized"
"-Wno-error=array-bounds"
];
dontUseCmakeConfigure = true;
# Remove in-tree QEMU sources, we don't need them in any circumstance.
prePatch = "rm -rf tools/qemu-xen tools/qemu-xen-traditional";
installPhase = ''
runHook preInstall
mkdir -p $out $out/share $boot
cp -prvd dist/install/nix/store/*/* $out/
cp -prvd dist/install/etc $out
# Decompresses the multiboot binary so it's present for bootloaders such as Limine
# The find command is used instead of a simple file glob so we skip processing symlinks
find dist/install/boot -type f -name '*.gz' -print -exec gunzip -k '{}' ';'
cp -prvd dist/install/boot $boot
runHook postInstall
'';
postInstall =
# Wrap xencov_split, xenmon and xentrace_format.
# We also need to wrap pygrub, which lies in $out/libexec/xen/bin.
''
wrapPythonPrograms
wrapPythonProgramsIn "$out/libexec/xen/bin" "$out $pythonPath"
'';
postFixup = ''
addAutoPatchelfSearchPath $out/lib
autoPatchelf $out/libexec/xen/bin
''
# Flask is particularly hard to disable. Even after
# setting the make flags to `n`, it still gets compiled.
# If withFlask is disabled, delete the extra binaries.
+ optionalString (!withFlask) ''
rm -f $out/bin/flask-*
'';
passthru = {
efi = "boot/xen-${finalAttrs.upstreamVersion}.efi";
multiboot = "boot/xen-${finalAttrs.upstreamVersion}";
flaskPolicy =
if withFlask then
warn "This Xen was compiled with FLASK support, but the FLASK file may not match the Xen version number. Please hardcode the path to the FLASK file instead." "boot/xenpolicy-${finalAttrs.upstreamVersion}"
else
throw "This Xen was compiled without FLASK support.";
# This test suite is very simple, as Xen's userspace
# utilities require the hypervisor to be booted.
tests = {
pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
moduleNames = [
"xencall"
"xencontrol"
"xendevicemodel"
"xenevtchn"
"xenforeignmemory"
"xengnttab"
"xenguest"
"xenhypfs"
"xenlight"
"xenstat"
"xenstore"
"xentoolcore"
"xentoollog"
"xenvchan"
"xlutil"
];
};
};
};
meta = {
branch = versions.majorMinor finalAttrs.version;
description = "Type-1 hypervisor intended for embedded and hyperscale use cases";
longDescription = ''
The Xen Project Hypervisor is a virtualisation technology defined as a *type-1
hypervisor*, which allows multiple virtual machines, known as domains, to run
concurrently with the host on the physical machine. On a typical *type-2
hypervisor*, the virtual machines run as applications on top of the
host. NixOS runs as the privileged **Domain 0**, and can paravirtualise or fully
virtualise **Unprivileged Domains**.
Use with the `qemu_xen` package.
''
+ "\nIncludes:\n* `xen-${finalAttrs.upstreamVersion}.efi`: The Xen Project's [EFI binary](https://xenbits.xenproject.org/docs/${finalAttrs.meta.branch}-testing/misc/efi.html), available on the `boot` output of this package."
+ "\n* `xen-${finalAttrs.upstreamVersion}`: The Xen Project's multiboot binary, available on the `boot` output of this package."
+ optionalString withFlask "\n* `xsm-flask`: The [FLASK Xen Security Module](https://wiki.xenproject.org/wiki/Xen_Security_Modules_:_XSM-FLASK). The `xenpolicy` file is available on the `boot` output of this package."
+ optionalString withSeaBIOS "\n* `seabios`: Support for the SeaBIOS boot firmware on HVM domains."
+ optionalString withOVMF "\n* `ovmf`: Support for the OVMF UEFI boot firmware on HVM domains."
+ optionalString withIPXE "\n* `ipxe`: Support for the iPXE boot firmware on HVM domains.";
homepage = "https://xenproject.org/";
downloadPage = "https://downloads.xenproject.org/release/xen/${finalAttrs.version}/";
changelog = "https://wiki.xenproject.org/wiki/Xen_Project_${finalAttrs.meta.branch}_Release_Notes";
license = [
# Documentation.
cc-by-40
# Most of Xen is licensed under the GPL v2.0.
gpl2Only
# Xen Libraries and the `xl` command-line utility.
lgpl21Only
# Development headers in $dev/include.
mit
];
teams = [ teams.xen ];
knownVulnerabilities = optionals (versionOlder finalAttrs.version minSupportedVersion) [
"The Xen Project Hypervisor version ${finalAttrs.version} is no longer supported by the Xen Project Security Team. See https://xenbits.xenproject.org/docs/unstable/support-matrix.html"
];
mainProgram = "xl";
platforms = [ isLinux ];
badPlatforms = [ isAarch64 ];
};
})

View File

@@ -0,0 +1,107 @@
{
lib,
python3,
gtk3,
lz4,
SDL2,
pkg-config,
vulkan-loader,
ninja,
cmake,
libuuid,
wrapGAppsHook3,
makeDesktopItem,
copyDesktopItems,
llvmPackages_20,
autoPatchelfHook,
unstableGitUpdater,
fetchFromGitHub,
}:
llvmPackages_20.stdenv.mkDerivation {
pname = "xenia-canary";
version = "0-unstable-2025-10-06";
src = fetchFromGitHub {
owner = "xenia-canary";
repo = "xenia-canary";
fetchSubmodules = true;
rev = "703531d541fb9391afed4fbb951db198c9193c28";
hash = "sha256-xLZBEnSxDhGWGscvE4Ht4wSAnSxY+0wBLAA2MVVobHg=";
};
dontConfigure = true;
nativeBuildInputs = [
python3
pkg-config
ninja
cmake
wrapGAppsHook3
copyDesktopItems
autoPatchelfHook
libuuid
];
postPatch = ''
substituteInPlace premake5.lua \
--replace-fail "cdialect(\"C17\")" ""
''; # Prevent build failure
NIX_CFLAGS_COMPILE = [
"-Wno-error=unused-result"
];
buildInputs = [
gtk3
lz4
SDL2
];
buildPhase = ''
runHook preBuild
python3 xenia-build.py setup
python3 xenia-build.py build --config=release
runHook postBuild
'';
runtimeDependencies = [
vulkan-loader
];
desktopItems = [
(makeDesktopItem {
name = "xenia_canary";
desktopName = "Xenia Canary";
genericName = "Xbox 360 Emulator";
exec = "xenia_canary";
comment = "Xbox 360 Emulator Research Project";
icon = "xenia-canary";
startupWMClass = "Xenia_canary";
categories = [
"Game"
"Emulator"
];
keywords = [ "xbox" ];
})
];
installPhase = ''
runHook preInstall
find ./build/bin -mindepth 3 -maxdepth 3 -type f -executable -exec install -Dm755 {} -t $out/bin \;
for width in 16 32 48 64 128 256; do
install -Dm644 assets/icon/$width.png $out/share/icons/hicolor/''${width}x''${width}/apps/xenia-canary.png
done
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
meta = {
description = "Xbox 360 Emulator Research Project";
homepage = "https://github.com/xenia-canary/xenia-canary";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ tuxy ];
mainProgram = "xenia_canary";
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,35 @@
{
python3,
lib,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "xenomapper";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "genomematt";
repo = "xenomapper";
rev = "v${version}";
sha256 = "0mnmfzlq5mhih6z8dq5bkx95vb8whjycz9mdlqwbmlqjb3gb3zhr";
};
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [ statistics ];
pythonImportsCheck = [
"xenomapper.xenomapper"
"xenomapper.mappability"
];
meta = with lib; {
homepage = "https://github.com/genomematt/xenomapper";
description = "Utility for post processing mapped reads that have been aligned to a primary genome and a secondary genome and binning reads into species specific, multimapping in each species, unmapped and unassigned bins";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = [ maintainers.jbedo ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
fetchPypi,
python3,
}:
let
pname = "xenon";
version = "0.9.3";
in
python3.pkgs.buildPythonApplication {
inherit pname version;
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-SnU42LoIql15BV+z4LI5PAvW19FqSrD83vAu8fEKQ/o=";
};
doCheck = false;
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
requests
radon
pyaml
];
pythonImportsCheck = [ "xenon" ];
meta = with lib; {
description = "Monitoring tool based on radon";
homepage = "https://github.com/rubik/xenon";
license = licenses.mit;
maintainers = with maintainers; [ jfvillablanca ];
mainProgram = "xenon";
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "xeol";
version = "0.10.8";
src = fetchFromGitHub {
owner = "xeol-io";
repo = "xeol";
tag = "v${version}";
hash = "sha256-eZpBz3WK7fE3ofakKP24ihiSfsBUrE2m5dCfv/4PXDo=";
};
vendorHash = "sha256-hPWjXTxk/jRkzvLYNgVlgj0hjzfikwel1bxSqWquVhk=";
proxyVendor = true;
subPackages = [ "cmd/xeol/" ];
ldflags = [
"-s"
"-X=main.version=${version}"
"-X=main.gitCommit=${src.rev}"
"-X=main.buildDate=1970-01-01T00:00:00Z"
"-X=main.gitDescription=${src.rev}"
];
meta = {
description = "Scanner for end-of-life (EOL) software and dependencies in container images, filesystems, and SBOMs";
homepage = "https://github.com/xeol-io/xeol";
changelog = "https://github.com/xeol-io/xeol/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "xeol";
};
}

View File

@@ -0,0 +1,153 @@
diff --git a/libastro/Makefile b/libastro/Makefile
index 0a8ecb6..b24e827 100644
--- a/libastro/Makefile
+++ b/libastro/Makefile
@@ -3,6 +3,9 @@
# compiler and flags
+AR = ar
+RANLIB = ranlib
+
# gcc
CC = gcc
CFLAGS= -O2 -Wall
@@ -83,8 +86,8 @@ OBJS = \
vsop87_data.o
libastro.a: $(HS) $(OBJS)
- ar rv $@ $(OBJS)
- ranlib $@
+ $(AR) rv $@ $(OBJS)
+ $(RANLIB) $@
libastro.so: $(HS) $(OBJS)
$(CC) -shared -o $@ $(OBJS)
diff --git a/libip/Makefile b/libip/Makefile
index 5c36ac8..e223dca 100644
--- a/libip/Makefile
+++ b/libip/Makefile
@@ -1,6 +1,9 @@
# Makefile for image processing routines, libip.
# (C) 2001 Elwood Charles Downey
+AR = ar
+RANLIB = ranlib
+
# gcc
CC = gcc
CFLAGS= -I../libastro -O2 -Wall
@@ -36,11 +39,11 @@ OBJS = \
HS = ip.h fsmatch.h
libip.a: $(HS) $(OBJS)
- ar rv $@ $(OBJS)
- ranlib $@
+ $(AR) rv $@ $(OBJS)
+ $(RANLIB) $@
libip.so: $(OBJS)
- gcc -shared -o $@ $(OBJS)
+ $(CC) -shared -o $@ $(OBJS)
clobber:
rm -f *.o libip.a
diff --git a/libjpegd/Makefile b/libjpegd/Makefile
index 46ea040..7562fc5 100644
--- a/libjpegd/Makefile
+++ b/libjpegd/Makefile
@@ -2,6 +2,9 @@
# compiler and flags
+AR = ar
+RANLIB = ranlib
+
# gcc
CC = gcc
CFLAGS= -O2 -Wall
@@ -62,8 +65,8 @@ OBJS = \
jutils.o
libjpegd.a: $(HS) $(OBJS)
- ar r $@ $(OBJS)
- ranlib $@
+ $(AR) r $@ $(OBJS)
+ $(RANLIB) $@
clobber:
touch x.o x.a
diff --git a/liblilxml/Makefile b/liblilxml/Makefile
index 2e73761..7f3f2c3 100644
--- a/liblilxml/Makefile
+++ b/liblilxml/Makefile
@@ -3,6 +3,9 @@
# compiler and flags
+AR = ar
+RANLIB = ranlib
+
# gcc
CC = gcc
CFLAGS= -O2 -Wall
@@ -27,8 +30,8 @@ HS = lilxml.h
OBJS = lilxml.o base64.o
liblilxml.a: $(HS) $(OBJS)
- ar r $@ $(OBJS)
- ranlib $@
+ $(AR) r $@ $(OBJS)
+ $(RANLIB) $@
liltest: liltest.o liblilxml.a
$(CC) $(LDFLAGS) -o liltest liltest.o liblilxml.a
diff --git a/libpng/Makefile b/libpng/Makefile
index 5f332cc..6217f2f 100644
--- a/libpng/Makefile
+++ b/libpng/Makefile
@@ -10,7 +10,7 @@ ZLIBLIB = ../libz
# Compiler, linker, lib and other tools
CC = gcc
LD = $(CC)
-AR = ar rcs
+AR = ar
RANLIB = ranlib
RM = rm -f
@@ -38,7 +38,7 @@ OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
all: libpng$(A)
libpng$(A): $(OBJS)
- $(AR) $@ $(OBJS)
+ $(AR) rcs $@ $(OBJS)
$(RANLIB) $@
clean:
diff --git a/libz/Makefile b/libz/Makefile
index 773f3ed..0fc73c0 100644
--- a/libz/Makefile
+++ b/libz/Makefile
@@ -1,3 +1,7 @@
+AR = ar
+RANLIB = ranlib
+
+CC = cc
CLDFLAGS =
CFLAGS = $(CLDFLAGS) -Wall -O2
LDFLAGS =
@@ -17,11 +21,11 @@ OBJS = adler32.o \
inffast.o
libz.a: $(OBJS)
- ar rc libz.a $(OBJS)
- -ranlib libz.a
+ $(AR) rc libz.a $(OBJS)
+ $(RANLIB) libz.a
testzlib: testzlib.o libz.a
- cc $(LDFLAGS) -o testzlib testzlib.o libz.a
+ $(CC) $(LDFLAGS) -o testzlib testzlib.o libz.a
clean:
rm -f *.o *.a testzlib

View File

@@ -0,0 +1,112 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
makeDesktopItem,
copyDesktopItems,
installShellFiles,
motif,
openssl,
groff,
xorg,
}:
stdenv.mkDerivation rec {
pname = "xephem";
version = "4.2.0";
src = fetchFromGitHub {
owner = "XEphem";
repo = "XEphem";
rev = version;
hash = "sha256-TuzXrWoJOAHg31DrJObPcHBXgtqR/KWKFRsqddPzL4c=";
};
nativeBuildInputs = [
copyDesktopItems
installShellFiles
groff # nroff
];
buildInputs = [
motif
openssl
xorg.libXmu
xorg.libXext
xorg.libXt
];
patches = [
# fix compile error with GCC 14
(fetchpatch {
url = "https://github.com/XEphem/XEphem/commit/30e14f685ede015fcd8985cd83ee6510f93f0073.patch";
hash = "sha256-wNoLjR6xEl56ZA6FLBS2xtySeDEYXTCA8j4Z5JIrF6k=";
})
./add-cross-compilation-support.patch
];
postPatch = ''
cd GUI/xephem
substituteInPlace xephem.c splash.c --replace-fail '/etc/XEphem' '${placeholder "out"}/etc/XEphem'
'';
doCheck = true;
checkFlags = "-C ../../tests";
checkTarget = "run-test";
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"AR=${stdenv.cc.targetPrefix}ar"
"RANLIB=${stdenv.cc.targetPrefix}ranlib"
];
installPhase = ''
runHook preInstall
installBin xephem
mkdir -p $out/share/xephem
cp -R auxil $out/share/xephem/
cp -R catalogs $out/share/xephem/
cp -R fifos $out/share/xephem/
cp -R fits $out/share/xephem/
cp -R gallery $out/share/xephem/
cp -R help $out/share/xephem/
cp -R lo $out/share/xephem/
mkdir $out/etc
echo "XEphem.ShareDir: $out/share/xephem" > $out/etc/XEphem
installManPage xephem.1
install -Dm644 XEphem.png -t $out/share/pixmaps
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "xephem";
exec = "xephem";
icon = "XEphem";
desktopName = "XEphem";
categories = [
"Science"
"Astronomy"
];
})
];
meta = {
description = "Interactive astronomy program for all UNIX platforms";
longDescription = ''
Xephem is an interactive astronomical ephemeris program for X Windows systems. It computes
heliocentric, geocentric and topocentric information for fixed celestial objects and objects
in heliocentric and geocentric orbits; has built-in support for all planet positions; the
moons of Jupiter, Saturn and Earth; Mars' and Jupiter's central meridian longitude; Saturn's
rings; and Jupiter's Great Red Spot.
'';
mainProgram = "xephem";
homepage = "https://xephem.github.io/XEphem/Site/xephem.html";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ EstebanMacanek ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,38 @@
{
stdenv,
lib,
fetchurl,
curl,
icu,
}:
stdenv.mkDerivation rec {
pname = "xerces-c";
version = "3.3.0";
src = fetchurl {
url = "mirror://apache/xerces/c/3/sources/${pname}-${version}.tar.gz";
sha256 = "sha256-lVXx0G+CmH+7RliGJwVRV0BBT9NLTbatLtdqLcCNO94=";
};
buildInputs = [
curl
icu
];
configureFlags = [
# Disable SSE2 extensions on platforms for which they are not enabled by default
"--disable-sse2"
"--enable-netaccessor-curl"
"--enable-transcoder-icu"
];
enableParallelBuilding = true;
meta = {
homepage = "https://xerces.apache.org/xerces-c/";
description = "Validating XML parser written in a portable subset of C++";
license = lib.licenses.asl20;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
clangStdenv,
fetchFromGitHub,
cmake,
cppzmq,
libuuid,
nlohmann_json,
openssl,
xeus,
xtl,
zeromq,
}:
clangStdenv.mkDerivation rec {
pname = "xeus-zmq";
version = "1.3.0";
src = fetchFromGitHub {
owner = "jupyter-xeus";
repo = "xeus-zmq";
rev = "${version}";
hash = "sha256-CrFb0LDb6akCfFnwMSa4H3D3A8KJx9Kiejw6VeV3IDs=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
cppzmq
libuuid
openssl
xeus
xtl
zeromq
];
propagatedBuildInputs = [ nlohmann_json ];
meta = {
description = "ZeroMQ-based middleware for xeus";
homepage = "https://github.com/jupyter-xeus/xeus-zmq";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ thomasjm ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
doctest,
nlohmann_json,
libuuid,
nix-update-script,
xtl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xeus";
version = "5.2.3";
src = fetchFromGitHub {
owner = "jupyter-xeus";
repo = "xeus";
tag = finalAttrs.version;
hash = "sha256-7hT2Ellgut25R3R28nRKd6/kKmfQf9NCoJ2BV9ZGt8I=";
};
nativeBuildInputs = [
cmake
doctest
];
buildInputs = [
nlohmann_json
libuuid
];
cmakeFlags = [
"-DXEUS_BUILD_TESTS=ON"
];
doCheck = true;
preCheck = ''export LD_LIBRARY_PATH=$PWD'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://xeus.readthedocs.io";
description = "C++ implementation of the Jupyter Kernel protocol";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ serge_sans_paille ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
xorgproto,
libx11,
libxrandr,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xev";
version = "1.2.6";
src = fetchurl {
url = "mirror://xorg/individual/app/xev-${finalAttrs.version}.tar.xz";
hash = "sha256-YeHF4AismXOsp83d826d90EOdwg7Aw6wT03HN8UYB9c=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
xorgproto
libx11
libxrandr
];
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/app/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "X event monitor";
longDescription = ''
xev creates a window and then asks the X server to send it X11 events whenever anything
happens to the window (such as it being moved, resized, typed in, clicked in, etc.).
You can also attach it to an existing window. It is useful for seeing what causes events to
occur and to display the information that they contain; it is essentially a debugging and
development tool, and should not be needed in normal usage.
'';
homepage = "https://gitlab.freedesktop.org/xorg/app/xev";
license = lib.licenses.x11;
mainProgram = "xev";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,104 @@
{
lib,
fetchFromGitHub,
fetchpatch2,
stdenv,
gitUpdater,
testers,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xevd";
version = "0.5.0";
src = fetchFromGitHub {
owner = "mpeg5";
repo = "xevd";
rev = "v${finalAttrs.version}";
hash = "sha256-Dc2V77t+DrZo9252FAL0eczrmikrseU02ob2RLBdVvU=";
};
patches = lib.optionals (!lib.versionOlder "0.5.0" finalAttrs.version) (
map fetchpatch2 [
# Upstream accepted patches, should be dropped on next version bump.
{
url = "https://github.com/mpeg5/xevd/commit/7eda92a6ebb622189450f7b63cfd4dcd32fd6dff.patch?full_index=1";
hash = "sha256-Ru7jGk1b+Id5x1zaiGb7YKZGTNaTcArZGYyHbJURfgs=";
}
{
url = "https://github.com/mpeg5/xevd/commit/499bc0153a99f8c8fd00143dd81fc0d858a5b509.patch?full_index=1";
hash = "sha256-3ExBNTeBhj/IBweYkgWZ2ZgUypFua4oSC24XXFmjxXA=";
}
{
url = "https://github.com/mpeg5/xevd/commit/b099623a09c09cddfe7f732fb795b2af8a020620.patch?full_index=1";
hash = "sha256-Ee/PQmsGpUCU7KUMbdGEXEEKOc8BHYcGF4mq+mmWb/w=";
}
{
url = "https://github.com/mpeg5/xevd/commit/2e6b24bf1f946c30d789b114dfd56e91b99039fe.patch?full_index=1";
hash = "sha256-thT0kVSKwWruyhIjDFBulyUNeyG9zQ8rQtpZVmRvYxI=";
}
{
url = "https://github.com/mpeg5/xevd/commit/c1f23a41b8def84ab006a8ce4e9221b2fff84a1a.patch?full_index=1";
hash = "sha256-MOJ9mU5txk6ISzJsQdK+TTb2dlWD8ofGZI0nfq9rsPo=";
}
{
url = "https://github.com/mpeg5/xevd/commit/adf1c45d6edb0d235997a40261689d7454b711c5.patch?full_index=1";
hash = "sha256-tGIPaswx9S1Oy8QF928RzV/AHr710kYxXfMRYg6SLR4=";
}
]
);
postPatch = ''
echo v$version > version.txt
'';
nativeBuildInputs = [ cmake ];
cmakeFlags =
let
inherit (lib) cmakeBool cmakeFeature optional;
inherit (stdenv.hostPlatform) isAarch64 isDarwin;
in
optional isAarch64 (cmakeBool "ARM" true)
++ optional isDarwin (cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin");
env.NIX_CFLAGS_COMPILE = toString (
map (w: "-Wno-" + w) (
[
# Evaluate on version bump whether still necessary.
"sometimes-uninitialized"
"unknown-warning-option"
]
++ (
# Fixed upstream in 325fd9f94f3fdf0231fa931a31ebb72e63dc3498 but might
# change behavior, therefore opted to leave it out for now.
lib.optional (!lib.versionOlder "0.5.0" finalAttrs.version) "for-loop-analysis"
)
)
);
postInstall = ''
ln $dev/include/xevd/* $dev/include/
'';
outputs = [
"out"
"lib"
"dev"
];
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
homepage = "https://github.com/mpeg5/xevd";
description = "eXtra-fast Essential Video Decoder, MPEG-5 EVC";
license = lib.licenses.bsd3;
mainProgram = "xevd_app";
pkgConfigModules = [ "xevd" ];
maintainers = with lib.maintainers; [ jopejoe1 ];
platforms = lib.platforms.all;
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
};
})

View File

@@ -0,0 +1,27 @@
From f3927c3cb05ffc77f62026bafd7cea1d25de1e72 Mon Sep 17 00:00:00 2001
From: toonn <toonn@toonn.io>
Date: Tue, 2 Jul 2024 19:23:11 +0200
Subject: [PATCH 1/2] CMakeLists.txt: Disable static linking on Darwin
---
CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0873d5..1d639c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,9 @@ if(NOT ARM)
else()
add_definitions(-DARM=1)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flax-vector-conversions")
- set(CMAKE_EXE_LINKER_FLAGS "-static")
+ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+ set(CMAKE_EXE_LINKER_FLAGS "-static")
+ endif()
endif()
message("ARM=${ARM}")
--
2.44.1

View File

@@ -0,0 +1,27 @@
From d1a480867c0778ee46ff0213e2b1e494afcb67fc Mon Sep 17 00:00:00 2001
From: toonn <toonn@toonn.io>
Date: Mon, 1 Jul 2024 15:19:37 +0200
Subject: [PATCH 2/2] sse2neon: Cast to variable type
The `__m128d` type corresponds to `float32x4_t` or `float64x2_t`
depending on the platform. The cast cannot explicitly use either type.
---
src_base/neon/sse2neon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src_base/neon/sse2neon.h b/src_base/neon/sse2neon.h
index 490c0a4..3290fa3 100644
--- a/src_base/neon/sse2neon.h
+++ b/src_base/neon/sse2neon.h
@@ -6003,7 +6003,7 @@ FORCE_INLINE void _mm_storeu_si32(void *p, __m128i a)
FORCE_INLINE void _mm_stream_pd(double *p, __m128d a)
{
#if __has_builtin(__builtin_nontemporal_store)
- __builtin_nontemporal_store(a, (float32x4_t *) p);
+ __builtin_nontemporal_store(a, (__m128d *) p);
#elif defined(__aarch64__)
vst1q_f64(p, vreinterpretq_f64_m128d(a));
#else
--
2.44.1

View File

@@ -0,0 +1,101 @@
{
lib,
fetchFromGitHub,
fetchpatch2,
gitUpdater,
stdenv,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xeve";
version = "0.5.1";
src = fetchFromGitHub {
owner = "mpeg5";
repo = "xeve";
rev = "v${finalAttrs.version}";
hash = "sha256-/DcYv2fInr8MN1wpOgJHcFWEvW//7SIXccheRfeaTHM=";
};
patches =
map fetchpatch2 [
{
url = "https://github.com/mpeg5/xeve/commit/954ed6e0494cd2438fd15c717c0146e88e582b33.patch?full_index=1";
hash = "sha256-//NtOUm1fqPFvOM955N6gF+QgmOdmuVunwx/3s/G/J8=";
}
{
url = "https://github.com/mpeg5/xeve/commit/07a6f2a6d13dfaa0f73c3752f8cd802c251d8252.patch?full_index=1";
hash = "sha256-P9J7Y9O/lb/MSa5oCfft7z764AbLBLZnMmrmPEZPcws=";
}
{
url = "https://github.com/mpeg5/xeve/commit/0a0f3bd397161253b606bdbeaa518fbe019d24e1.patch?full_index=1";
hash = "sha256-PoZpE64gWkTUS4Q+SK+DH1I1Ac0UEzwwnlvpYN16hsI=";
}
{
url = "https://github.com/mpeg5/xeve/commit/e029f1619ecedbda152b8680641fa10eea9eeace.patch?full_index=1";
hash = "sha256-ooIBzNtGSjDgYvTzA8T0KB+QzsUiy14mPpoRqrHF3Pg=";
}
]
++ [
# Backport to 0.5.0 of upstream patch c564ac77c103dbba472df3e13f4733691fd499ed
./0001-CMakeLists.txt-Disable-static-linking-on-Darwin.patch
# Rejected upstream, can be dropped when a fix for
# https://github.com/mpeg5/xeve/pull/123 is in a version bump.
./0002-sse2neon-Cast-to-variable-type.patch
];
postPatch = ''
echo v$version > version.txt
'';
nativeBuildInputs = [ cmake ];
cmakeFlags =
let
inherit (lib) cmakeBool cmakeFeature optional;
inherit (stdenv.hostPlatform) isAarch64 isDarwin;
in
optional isAarch64 (cmakeBool "ARM" true)
++ optional isDarwin (cmakeFeature "CMAKE_SYSTEM_NAME" "Darwin");
env.NIX_CFLAGS_COMPILE = toString (
map (w: "-Wno-" + w) [
# Patch addressing an if without a body was rejected upstream, third
# line-based comment in this thread, https://github.com/mpeg5/xeve/pull/122#pullrequestreview-2187744305
# Evaluate on version bump whether still necessary.
"empty-body"
# Evaluate on version bump whether still necessary.
"parentheses-equality"
"unknown-warning-option"
# Fixed upstream in 325fd9f94f3fdf0231fa931a31ebb72e63dc3498 but might
# change behavior, therefore opted to leave it out for now.
"for-loop-analysis"
]
);
postInstall = ''
ln $dev/include/xeve/* $dev/include/
'';
outputs = [
"out"
"lib"
"dev"
];
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
homepage = "https://github.com/mpeg5/xeve";
description = "eXtra-fast Essential Video Encoder, MPEG-5 EVC";
license = lib.licenses.bsd3;
mainProgram = "xeve_app";
maintainers = with lib.maintainers; [ jopejoe1 ];
platforms = lib.platforms.all;
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
};
})