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,51 @@
{
lib,
stdenv,
fetchzip,
autoPatchelfHook,
libusb1,
libX11,
libXtst,
qt5,
libglvnd,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xp-pen-g430-driver";
version = "1.2.13.1";
src = fetchzip {
url = "https://archive.org/download/linux-pentablet-v-1.2.13.1.tar.gz-20200428/Linux_Pentablet_V1.2.13.1.tar.gz%2820200428%29.zip/Linux_Pentablet_V1.2.13.1.tar.gz";
name = "xp-pen-g430-driver-${finalAttrs.version}.tar.gz";
hash = "sha256-Wavf4EAzR/NX3GOfdAEdFX08gkD03FVvAkIl37Zmipc=";
};
nativeBuildInputs = [
autoPatchelfHook
qt5.wrapQtAppsHook
];
buildInputs = [
libusb1
libX11
libXtst
qt5.qtbase
libglvnd
(lib.getLib stdenv.cc.cc)
];
installPhase = ''
mkdir -p $out/bin
cp Pentablet_Driver $out/bin/pentablet-driver
cp config.xml $out/bin/config.xml
'';
meta = {
homepage = "https://www.xp-pen.com/download-46.html";
description = "Driver for XP-PEN Pentablet drawing tablets";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = [ ];
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
pkg-config,
wrapGAppsHook3,
glib,
intltool,
gtk3,
gtksourceview4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xpad";
version = "5.8.0";
src = fetchurl {
url = "https://launchpad.net/xpad/trunk/${finalAttrs.version}/+download/xpad-${finalAttrs.version}.tar.bz2";
hash = "sha256-8mBSMIhQxAaxWtuNhqzTli7xCvIrQnuxpc/07slvguk=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
wrapGAppsHook3
intltool
];
buildInputs = [
glib
gtk3
gtksourceview4
];
meta = {
description = "Sticky note application for jotting down things to remember";
mainProgram = "xpad";
homepage = "https://launchpad.net/xpad";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ michalrus ];
};
})

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
ninja,
opencv,
SDL2,
gtk3,
catch2_3,
spdlog,
exiv2,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "xpano";
version = "0.19.3";
src = fetchFromGitHub {
owner = "krupkat";
repo = "xpano";
tag = "v${version}";
sha256 = "sha256-f2qoBpZ5lPBocPas8KMsY5bSYL20gO+ZHLz2R66qSig=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
ninja
pkg-config
wrapGAppsHook3
];
buildInputs = [
opencv
SDL2
gtk3
spdlog
exiv2
];
checkInputs = [
catch2_3
];
doCheck = true;
cmakeFlags = [
"-DBUILD_TESTING=ON"
"-DXPANO_INSTALL_DESKTOP_FILES=ON"
];
meta = {
description = "Panorama stitching tool";
mainProgram = "Xpano";
homepage = "https://krupkat.github.io/xpano/";
changelog = "https://github.com/krupkat/xpano/releases/tag/v${version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ krupkat ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
nasm,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xpar";
version = "0.7";
src = fetchFromGitHub {
owner = "kspalaiologos";
repo = "xpar";
rev = finalAttrs.version;
hash = "sha256-uZfOrhXEDBvALd+rCluzcMPDW/no9t8PqGBuoZm6MtA=";
};
nativeBuildInputs = [
autoreconfHook
]
++ lib.optionals stdenv.hostPlatform.isx86_64 [ nasm ];
configureFlags = [
"--disable-arch-native"
"--enable-lto"
]
++ lib.optional stdenv.hostPlatform.isx86_64 "--enable-x86-64"
++ lib.optional stdenv.hostPlatform.isAarch64 "--enable-aarch64";
meta = {
description = "Error/erasure code system guarding data integrity";
homepage = "https://github.com/kspalaiologos/xpar";
changelog = "https://github.com/kspalaiologos/xpar/blob/${finalAttrs.version}/NEWS";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ mrbenjadmin ];
platforms = lib.platforms.all;
mainProgram = "xpar";
};
})

View File

@@ -0,0 +1,35 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "xpaste";
version = "1.6";
pyproject = true;
src = fetchFromGitHub {
owner = "ossobv";
repo = "xpaste";
tag = "v${version}";
hash = "sha256-eVnoLG+06UTOkvGhzL/XS4JBrEwbXYZ1fuNTIW7YAfE=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
xlib
];
# no tests, no python module to import, no version output to check
doCheck = false;
meta = with lib; {
description = "Paste text into X windows that don't work with selections";
mainProgram = "xpaste";
homepage = "https://github.com/ossobv/xpaste";
license = licenses.gpl3;
maintainers = with maintainers; [ gador ];
};
}

View File

@@ -0,0 +1,158 @@
{
stdenvNoCC,
lib,
fetchzip,
makeDesktopItem,
autoPatchelfHook,
zlib,
fontconfig,
udev,
gtk3,
freetype,
alsa-lib,
makeShellWrapper,
libX11,
libXext,
libXdamage,
libXfixes,
libxcb,
libXcomposite,
libXcursor,
libXi,
libXrender,
libXtst,
libXxf86vm,
util-linux,
socat,
}:
let
inherit (stdenvNoCC.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
# Keep this setup to easily add more arch support in the future
arch =
{
x86_64-linux = "x86_64";
}
.${system} or throwSystem;
hash =
{
x86_64-linux = "sha256-HQ9d0yUaYRh20/OczwQzshbyO8wMh5vRh+RRNwNIx74=";
}
.${system} or throwSystem;
displayname = "XPipe";
in
stdenvNoCC.mkDerivation rec {
pname = "xpipe";
version = "18.7";
src = fetchzip {
url = "https://github.com/xpipe-io/xpipe/releases/download/${version}/xpipe-portable-linux-${arch}.tar.gz";
inherit hash;
};
nativeBuildInputs = [
autoPatchelfHook
makeShellWrapper
];
# Ignore libavformat dependencies as we don't need them
autoPatchelfIgnoreMissingDeps = true;
buildInputs = [
fontconfig
zlib
udev
freetype
gtk3
alsa-lib
libX11
libX11
libXext
libXdamage
libXfixes
libxcb
libXcomposite
libXcursor
libXi
libXrender
libXtst
libXxf86vm
util-linux
socat
];
desktopItem = makeDesktopItem {
categories = [ "Network" ];
comment = "Your entire server infrastructure at your fingertips";
desktopName = displayname;
exec = "/opt/${pname}/bin/xpipe open %U";
genericName = "Shell connection hub";
icon = "/opt/${pname}/logo.png";
name = displayname;
};
installPhase = ''
runHook preInstall
pkg="${pname}"
mkdir -p $out/opt/$pkg
cp -r ./ $out/opt/$pkg
mkdir -p "$out/bin"
ln -s "$out/opt/$pkg/bin/xpipe" "$out/bin/$pkg"
mkdir -p "$out/share/applications"
cp -r "${desktopItem}/share/applications/" "$out/share/"
substituteInPlace "$out/share/applications/${displayname}.desktop" --replace "Exec=" "Exec=$out"
substituteInPlace "$out/share/applications/${displayname}.desktop" --replace "Icon=" "Icon=$out"
mv "$out/opt/$pkg/bin/xpiped" "$out/opt/$pkg/bin/xpiped_raw"
mv "$out/opt/$pkg/lib/app/xpiped.cfg" "$out/opt/$pkg/lib/app/xpiped_raw.cfg"
mv "$out/opt/$pkg/scripts/xpiped_debug.sh" "$out/opt/$pkg/scripts/xpiped_debug_raw.sh"
makeShellWrapper "$out/opt/$pkg/bin/xpiped_raw" "$out/opt/$pkg/bin/xpiped" \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
fontconfig
gtk3
udev
util-linux
socat
]
}"
makeShellWrapper "$out/opt/$pkg/scripts/xpiped_debug_raw.sh" "$out/opt/$pkg/scripts/xpiped_debug.sh" \
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
fontconfig
gtk3
udev
util-linux
socat
]
}"
runHook postInstall
'';
meta = {
description = "Cross-platform shell connection hub and remote file manager";
homepage = "https://github.com/xpipe-io/${pname}";
downloadPage = "https://github.com/xpipe-io/${pname}/releases/latest";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
changelog = "https://github.com/xpipe-io/${pname}/releases/tag/${version}";
license = [
lib.licenses.asl20
lib.licenses.unfree
];
maintainers = with lib.maintainers; [ crschnick ];
platforms = [ "x86_64-linux" ];
mainProgram = "xpipe";
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
freetype,
pango,
libpng,
libtiff,
giflib,
libjpeg,
netpbm,
}:
stdenv.mkDerivation rec {
pname = "xplanet";
version = "1.3.1";
src = fetchurl {
url = "mirror://sourceforge/xplanet/${pname}-${version}.tar.gz";
sha256 = "1rzc1alph03j67lrr66499zl0wqndiipmj99nqgvh9xzm1qdb023";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
freetype
pango
libpng
libtiff
giflib
libjpeg
netpbm
];
patches = [
(fetchpatch {
name = "giflib6.patch";
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/ce6f25eb369dc011161613894f01fd0a6ae85a09/trunk/giflib6.patch";
sha256 = "173l0xkqq0v2bpaff7hhwc7y2aw5cclqw8988k1nalhyfbrjb8bl";
})
(fetchpatch {
name = "xplanet-c++11.patch";
url = "https://raw.githubusercontent.com/archlinux/svntogit-community/ce6f25eb369dc011161613894f01fd0a6ae85a09/trunk/xplanet-c++11.patch";
sha256 = "0vldai78ixw49bxch774pps6pq4sp0p33qvkvxywcz7p8kzpg8q2";
})
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
meta = with lib; {
description = "Renders an image of the earth or other planets into the X root window";
mainProgram = "xplanet";
homepage = "https://xplanet.sourceforge.net";
license = licenses.gpl2;
maintainers = with maintainers; [
lassulus
sander
];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,97 @@
{
lib,
cmake,
dbus,
fetchFromGitHub,
fetchYarnDeps,
freetype,
gtk3,
libsoup_2_4,
stdenvNoCC,
yarnConfigHook,
yarnBuildHook,
nodejs,
openssl,
pkg-config,
rustPlatform,
webkitgtk_4_0,
}:
let
pname = "xplorer";
version = "unstable-2023-03-19";
src = fetchFromGitHub {
owner = "kimlimjustin";
repo = "xplorer";
rev = "8d69a281cbceda277958796cb6b77669fb062ee3";
sha256 = "sha256-VFRdkSfe2mERaYYtZlg9dvH1loGWVBGwiTRj4AoNEAo=";
};
frontend-build = stdenvNoCC.mkDerivation (finalAttrs: {
inherit version src;
pname = "xplorer-ui";
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
sha256 = "sha256-H37vD0GTSsWV5UH7C6UANDWnExTGh8yqajLn3y7P2T8=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
yarnBuildScript = "prebuild";
installPhase = ''
cp -r out $out
'';
});
in
rustPlatform.buildRustPackage {
inherit version src pname;
sourceRoot = "${src.name}/src-tauri";
cargoHash = "sha256-D7qgmxDYQEgOkEYKDSLA875bXeTKDvAntF7kB4esn24=";
# copy the frontend static resources to final build directory
# Also modify tauri.conf.json so that it expects the resources at the new location
postPatch = ''
mkdir -p frontend-build
cp -R ${frontend-build}/src frontend-build
substituteInPlace tauri.conf.json --replace '"distDir": "../out/src",' '"distDir": "frontend-build/src",'
'';
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
dbus
openssl
freetype
libsoup_2_4
gtk3
webkitgtk_4_0
];
checkFlags = [
# tries to mutate the parent directory
"--skip=test_file_operation"
];
postInstall = ''
mv $out/bin/app $out/bin/xplorer
'';
meta = with lib; {
description = "Customizable, modern file manager";
homepage = "https://xplorer.space";
license = licenses.asl20;
maintainers = with maintainers; [ dit7ya ];
mainProgram = "xplorer";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "xplr";
version = "1.0.1";
src = fetchFromGitHub {
owner = "sayanarijit";
repo = "xplr";
rev = "v${version}";
hash = "sha256-78MHWdvWxXGcptMW3AUTYrpfdAai59x1KnW4uMaUZC8=";
};
cargoHash = "sha256-qC9KutkGLUuG7xQeO/Vg3oRqh8hCQuHisJA5diYizAg=";
# fixes `thread 'main' panicked at 'cannot find strip'` on x86_64-darwin
env = lib.optionalAttrs (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) {
TARGET_STRIP = "${stdenv.cc.targetPrefix}strip";
};
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
rm .cargo/config.toml
'';
postInstall = ''
mkdir -p $out/share/applications
cp assets/desktop/xplr.desktop $out/share/applications
mkdir -p $out/share/icons/hicolor/scalable/apps
cp assets/icon/xplr.svg $out/share/icons/hicolor/scalable/apps
for size in 16 32 64 128; do
icon_dir=$out/share/icons/hicolor/''${size}x$size/apps
mkdir -p $icon_dir
cp assets/icon/xplr$size.png $icon_dir/xplr.png
done
'';
meta = with lib; {
description = "Hackable, minimal, fast TUI file explorer";
mainProgram = "xplr";
homepage = "https://xplr.dev";
changelog = "https://github.com/sayanarijit/xplr/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [
sayanarijit
suryasr007
pyrox0
mimame
figsoda
];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
xorg,
pkg-config,
fetchFromGitHub,
autoreconfHook,
}:
stdenv.mkDerivation rec {
pname = "xplugd";
version = "1.4";
src = fetchFromGitHub {
owner = "troglobit";
repo = "xplugd";
rev = "v${version}";
sha256 = "11vjr69prrs4ir9c267zwq4g9liipzrqi0kmw1zg95dbn7r7zmql";
};
buildInputs = with xorg; [
libX11
libXi
libXrandr
libXext
];
nativeBuildInputs = [
pkg-config
autoreconfHook
];
meta = with lib; {
homepage = "https://github.com/troglobit/xplugd";
description = "UNIX daemon that executes a script on X input and RandR changes";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ akho ];
mainProgram = "xplugd";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libX11,
libXfixes,
libXrandr,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xpointerbarrier";
version = "23.08";
src = fetchurl {
url = "https://www.uninformativ.de/git/xpointerbarrier/archives/xpointerbarrier-v${finalAttrs.version}.tar.gz";
hash = "sha256-d0PcZ4z8JgN4ncPUGeJZwIV5vB7M0Jo7o1/L6mrJtUc=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libX11
libXfixes
libXrandr
];
makeFlags = [ "prefix=$(out)" ];
passthru.updateScript = gitUpdater {
url = "https://www.uninformativ.de/git/xpointerbarrier.git/";
rev-prefix = "v";
};
meta = with lib; {
homepage = "https://www.uninformativ.de/git/xpointerbarrier/file/README.html";
description = "Create X11 pointer barriers around your working area";
license = licenses.mit;
maintainers = with maintainers; [
xzfc
];
platforms = platforms.linux;
mainProgram = "xpointerbarrier";
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
fetchFromGitHub,
stdenvNoCC,
python3,
uglify-js,
gitUpdater,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
name = "xpra-html5";
version = "17.1";
src = fetchFromGitHub {
owner = "Xpra-org";
repo = "xpra-html5";
tag = "v${finalAttrs.version}";
hash = "sha256-vmv3L5Fcq1GF/txqHV6pCT530SFKm0RpfGmI4BLGGp0=";
};
buildInputs = [
python3
uglify-js
];
installPhase = ''
runHook preInstall
python $src/setup.py install $out /share/xpra/www /share/xpra/www
runHook postInstall
'';
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
meta = {
homepage = "https://xpra.org/";
downloadPage = "https://xpra.org/src/";
description = "HTML5 client for Xpra";
changelog = "https://github.com/Xpra-org/xpra-html5/releases/tag/v${finalAttrs.version}";
platforms = lib.platforms.linux;
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
catern
lucasew
];
};
})

View File

@@ -0,0 +1,96 @@
--- a/src/dummy.h 2016-12-17 23:02:53.396287041 +0100
+++ b/src/dummy.h 2016-12-17 23:03:30.319616550 +0100
@@ -51,6 +51,7 @@
/* options */
OptionInfoPtr Options;
Bool swCursor;
+ Bool constantDPI;
/* proc pointer */
CloseScreenProcPtr CloseScreen;
xf86CursorInfoPtr CursorInfo;
--- a/src/dummy_driver.c 2016-12-14 21:54:20.000000000 +0100
+++ b/src/dummy_driver.c 2016-12-17 23:04:59.916416126 +0100
@@ -17,6 +17,12 @@
/* All drivers using the mi colormap manipulation need this */
#include "micmap.h"
+#ifdef RANDR
+#include "randrstr.h"
+#endif
+
+#include "windowstr.h"
+
/* identifying atom needed by magnifiers */
#include <X11/Xatom.h>
#include "property.h"
@@ -115,11 +121,15 @@
};
typedef enum {
- OPTION_SW_CURSOR
+ OPTION_SW_CURSOR,
+ OPTION_CONSTANT_DPI
} DUMMYOpts;
static const OptionInfoRec DUMMYOptions[] = {
{ OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE },
+#ifdef RANDR
+ { OPTION_CONSTANT_DPI, "ConstantDPI", OPTV_BOOLEAN, {0}, FALSE },
+#endif
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -359,6 +369,7 @@
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, dPtr->Options);
xf86GetOptValBool(dPtr->Options, OPTION_SW_CURSOR,&dPtr->swCursor);
+ xf86GetOptValBool(dPtr->Options, OPTION_CONSTANT_DPI, &dPtr->constantDPI);
if (device->videoRam != 0) {
pScrn->videoRam = device->videoRam;
@@ -639,10 +650,45 @@
return TRUE;
}
+const char *XDPY_PROPERTY = "dummy-constant-xdpi";
+const char *YDPY_PROPERTY = "dummy-constant-ydpi";
+static int get_dpi_value(WindowPtr root, const char *property_name, int default_dpi)
+{
+ PropertyPtr prop;
+ Atom type_atom = MakeAtom("CARDINAL", 8, TRUE);
+ Atom prop_atom = MakeAtom(property_name, strlen(property_name), FALSE);
+
+ for (prop = wUserProps(root); prop; prop = prop->next) {
+ if (prop->propertyName == prop_atom && prop->type == type_atom && prop->data) {
+ int v = (int) (*((CARD32 *) prop->data));
+ if ((v>0) && (v<4096)) {
+ xf86DrvMsg(0, X_INFO, "get_constant_dpi_value() found property \"%s\" with value=%i\n", property_name, (int) v);
+ return (int) v;
+ }
+ break;
+ }
+ }
+ return default_dpi;
+}
+
/* Mandatory */
Bool
DUMMYSwitchMode(SWITCH_MODE_ARGS_DECL)
{
+ SCRN_INFO_PTR(arg);
+#ifdef RANDR
+ DUMMYPtr dPtr = DUMMYPTR(pScrn);
+ if (dPtr->constantDPI) {
+ int xDpi = get_dpi_value(pScrn->pScreen->root, XDPY_PROPERTY, pScrn->xDpi);
+ int yDpi = get_dpi_value(pScrn->pScreen->root, YDPY_PROPERTY, pScrn->yDpi);
+ //25.4 mm per inch: (254/10)
+ pScrn->pScreen->mmWidth = mode->HDisplay * 254 / xDpi / 10;
+ pScrn->pScreen->mmHeight = mode->VDisplay * 254 / yDpi / 10;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "mm(dpi %ix%i)=%ix%i\n", xDpi, yDpi, pScrn->pScreen->mmWidth, pScrn->pScreen->mmHeight);
+ RRScreenSizeNotify(pScrn->pScreen);
+ RRTellChanged(pScrn->pScreen);
+ }
+#endif
return TRUE;
}

View File

@@ -0,0 +1,39 @@
--- xf86-video-dummy-0.3.6/src/dummy_driver.c 2014-11-05 19:24:02.668656601 +0700
+++ xf86-video-dummy-0.3.6.new/src/dummy_driver.c 2014-11-05 19:37:53.076061853 +0700
@@ -55,6 +55,9 @@
#include <X11/extensions/xf86dgaproto.h>
#endif
+/* Needed for fixing pointer limits on resize */
+#include "inputstr.h"
+
/* Mandatory functions */
static const OptionInfoRec * DUMMYAvailableOptions(int chipid, int busid);
static void DUMMYIdentify(int flags);
@@ -713,6 +716,26 @@
RRTellChanged(pScrn->pScreen);
}
#endif
+ //ensure the screen dimensions are also updated:
+ pScrn->pScreen->width = mode->HDisplay;
+ pScrn->pScreen->height = mode->VDisplay;
+ pScrn->virtualX = mode->HDisplay;
+ pScrn->virtualY = mode->VDisplay;
+ pScrn->frameX1 = mode->HDisplay;
+ pScrn->frameY1 = mode->VDisplay;
+
+ //ensure the pointer uses the new limits too:
+ DeviceIntPtr pDev;
+ SpritePtr pSprite;
+ for (pDev = inputInfo.devices; pDev; pDev = pDev->next) {
+ if (pDev->spriteInfo!=NULL && pDev->spriteInfo->sprite!=NULL) {
+ pSprite = pDev->spriteInfo->sprite;
+ pSprite->hotLimits.x2 = mode->HDisplay;
+ pSprite->hotLimits.y2 = mode->VDisplay;
+ pSprite->physLimits.x2 = mode->HDisplay;
+ pSprite->physLimits.y2 = mode->VDisplay;
+ }
+ }
return TRUE;
}

View File

@@ -0,0 +1,18 @@
diff --git a/xpra/scripts/main.py b/xpra/scripts/main.py
index 7806612e05..4c7a0ec2dd 100755
--- a/xpra/scripts/main.py
+++ b/xpra/scripts/main.py
@@ -444,13 +444,7 @@ def run_mode(script_file: str, cmdline, error_cb, options, args, full_mode: str,
"seamless", "desktop", "shadow", "shadow-screen", "expand",
"upgrade", "upgrade-seamless", "upgrade-desktop",
) and not display_is_remote and options.daemon and use_systemd_run(options.systemd_run):
- # make sure we run via the same interpreter,
- # inject it into the command line if we have to:
argv = list(cmdline)
- if argv[0].find("python") < 0:
- major, minor = sys.version_info.major, sys.version_info.minor
- python = which("python%i.%i" % (major, minor)) or which("python%i" % major) or which("python") or "python"
- argv.insert(0, python)
return systemd_run_wrap(mode, argv, options.systemd_run_args, user=getuid() != 0)
configure_env(options.env)
configure_logging(options, mode)

View File

@@ -0,0 +1,15 @@
diff --git a/xpra/server/util.py b/xpra/server/util.py
index 401a9fb959..678e2ce745 100644
--- a/xpra/server/util.py
+++ b/xpra/server/util.py
@@ -175,6 +175,10 @@ def xpra_env_shell_script(socket_dir: str, env: dict[str, str]) -> str:
def xpra_runner_shell_script(xpra_file: str, starting_dir: str) -> str:
+ # Nixpkgs contortion:
+ # xpra_file points to a shell wrapper, not to the python script.
+ dirname, basename = os.path.split(xpra_file)
+ xpra_file = os.path.join(dirname, "."+basename+"-wrapped")
# We ignore failures in cd'ing, b/c it's entirely possible that we were
# started from some temporary directory and all paths are absolute.
qdir = sh_quotemeta(starting_dir)

View File

@@ -0,0 +1,11 @@
prefix=@out@
includedir=${prefix}/include
libdir=@nvidia_x11@/lib
Name: nvenc
Description: NVENC
Version: 10
Requires:
Conflicts:
Libs: -L${libdir} -lnvidia-encode
Cflags: -I${includedir}

View File

@@ -0,0 +1,298 @@
{
lib,
fetchFromGitHub,
pkg-config,
runCommand,
writeText,
wrapGAppsHook3,
withNvenc ? false,
atk,
cairo,
cudatoolkit,
cudaPackages,
ffmpeg,
gdk-pixbuf,
getopt,
glib,
gobject-introspection,
gst_all_1,
gtk3,
libappindicator,
libfakeXinerama,
librsvg,
libvpx,
libwebp,
systemd,
lz4,
nv-codec-headers-10,
nvidia_x11 ? null,
pam,
pandoc,
pango,
pulseaudioFull,
python3,
stdenv,
util-linux,
which,
x264,
x265,
libavif,
openh264,
libyuv,
xauth,
xdg-utils,
xorg,
xorgserver,
xxHash,
clang,
withHtml ? true,
xpra-html5,
udevCheckHook,
}@args:
let
inherit (python3.pkgs) cython buildPythonApplication;
xf86videodummy = xorg.xf86videodummy.overrideDerivation (p: {
patches = [
# patch provided by Xpra upstream
./0002-Constant-DPI.patch
# https://github.com/Xpra-org/xpra/issues/349
./0003-fix-pointer-limits.patch
];
});
xorgModulePaths = writeText "module-paths" ''
Section "Files"
ModulePath "${xorgserver}/lib/xorg/modules"
ModulePath "${xorgserver}/lib/xorg/modules/extensions"
ModulePath "${xorgserver}/lib/xorg/modules/drivers"
ModulePath "${xf86videodummy}/lib/xorg/modules/drivers"
EndSection
'';
nvencHeaders =
runCommand "nvenc-headers"
{
inherit nvidia_x11;
}
''
mkdir -p $out/include $out/lib/pkgconfig
cp ${nv-codec-headers-10}/include/ffnvcodec/nvEncodeAPI.h $out/include
substituteAll ${./nvenc.pc} $out/lib/pkgconfig/nvenc.pc
'';
nvjpegHeaders = runCommand "nvjpeg-headers" { } ''
mkdir -p $out/include $out/lib/pkgconfig
substituteAll ${cudaPackages.libnvjpeg.dev}/share/pkgconfig/nvjpeg.pc $out/lib/pkgconfig/nvjpeg.pc
'';
in
buildPythonApplication rec {
pname = "xpra";
version = "6.3.3";
format = "setuptools";
stdenv = if withNvenc then cudaPackages.backendStdenv else args.stdenv;
src = fetchFromGitHub {
owner = "Xpra-org";
repo = "xpra";
tag = "v${version}";
hash = "sha256-hk+C6I/QS6ihwmuNlnoNFipJ98SW6LO+Qa3Uh1h1Ji8=";
};
patches = [
./fix-41106.patch # https://github.com/NixOS/nixpkgs/issues/41106
./fix-122159.patch # https://github.com/NixOS/nixpkgs/issues/122159
];
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace xpra/platform/posix/features.py \
--replace-fail "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
patchShebangs --build fs/bin/build_cuda_kernels.py
'';
INCLUDE_DIRS = "${pam}/include";
nativeBuildInputs = [
clang
gobject-introspection
pkg-config
wrapGAppsHook3
pandoc
udevCheckHook
]
++ lib.optional withNvenc cudatoolkit;
buildInputs =
with xorg;
[
libX11
libXcomposite
libXdamage
libXfixes
libXi
libxkbfile
libXrandr
libXrender
libXres
libXtst
xorgproto
]
++ (with gst_all_1; [
gst-libav
gst-vaapi
gst-plugins-ugly
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gstreamer
])
++ [
atk.out
cairo
cython
ffmpeg
gdk-pixbuf
glib
gtk3
libappindicator
librsvg
libvpx
libwebp
lz4
pam
pango
x264
x265
libavif
openh264
libyuv
xxHash
systemd
]
++ lib.optional withNvenc [
nvencHeaders
nvjpegHeaders
];
propagatedBuildInputs =
with python3.pkgs;
(
[
cryptography
dbus-python
gst-python
idna
lz4
netifaces
numpy
opencv4
pam
paramiko
pillow
pycairo
pycrypto
pycups
pygobject3
pyinotify
pyopengl
pyopengl-accelerate
python-uinput
pyxdg
rencode
invoke
aioquic
uvloop
pyopenssl
]
++ lib.optionals withNvenc [
pycuda
pynvml
]
);
# error: 'import_cairo' defined but not used
env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
setupPyBuildFlags = [
"--with-Xdummy"
"--without-Xdummy_wrapper"
"--without-strict"
"--with-gtk3"
# Override these, setup.py checks for headers in /usr/* paths
"--with-pam"
"--with-vsock"
]
++ lib.optional withNvenc [
"--with-nvenc"
"--with-nvjpeg_encoder"
];
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--set XPRA_INSTALL_PREFIX "$out"
--set XPRA_COMMAND "$out/bin/xpra"
--set XPRA_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb"
--set XORG_CONFIG_PREFIX ""
--prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib
--prefix PATH : ${
lib.makeBinPath [
getopt
xorgserver
xauth
which
util-linux
pulseaudioFull
]
}
''
+ lib.optionalString withNvenc ''
--prefix LD_LIBRARY_PATH : ${nvidia_x11}/lib
''
+ ''
)
'';
postInstall = ''
# append module paths to xorg.conf
cat ${xorgModulePaths} >> $out/etc/xpra/xorg.conf
cat ${xorgModulePaths} >> $out/etc/xpra/xorg-uinput.conf
# make application icon visible to desktop environemnts
icon_dir="$out/share/icons/hicolor/64x64/apps"
mkdir -p "$icon_dir"
ln -sr "$out/share/icons/xpra.png" "$icon_dir"
''
+ lib.optionalString withHtml ''
ln -s ${xpra-html5}/share/xpra/www $out/share/xpra/www;
'';
# doCheck = false;
enableParallelBuilding = true;
passthru = {
inherit xf86videodummy;
updateScript = ./update.sh;
};
meta = {
homepage = "https://xpra.org/";
downloadPage = "https://xpra.org/src/";
description = "Persistent remote applications for X";
changelog = "https://github.com/Xpra-org/xpra/releases/tag/v${version}";
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
offline
numinit
mvnetbiz
lucasew
];
};
}

5
pkgs/by-name/xp/xpra/update.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl perl common-updater-scripts
version=$(curl https://xpra.org/src/ | perl -ne 'print "$1\n" if /xpra-([[:digit:].]+)\./' | sort -V | tail -n1)
update-source-version xpra "$version"

View File

@@ -0,0 +1,8 @@
{
xpra,
linuxPackages,
}:
xpra.override {
withNvenc = true;
nvidia_x11 = linuxPackages.nvidia_x11.override { libsOnly = true; };
}

View File

@@ -0,0 +1,62 @@
Fixes the config.h include error during build:
```console
In file included from src/xprintidle-ng.c:36:
lib/time.h:28:3: error: #error "Please include config.h first."
28 | #error "Please include config.h first."
| ^~~~~
```
Introduced since gnulib upgrade:
* https://github.com/coreutils/gnulib/commit/8ad7bc6
* https://lists.gnu.org/archive/html/bug-gnulib/2023-04/msg00088.html
* https://www.gnu.org/software/gnulib/manual/html_node/Source-changes.html
The last version of gnulib now checks that config.h is the first include
in every compilation unit.
This is not the case with the xprintidle-ng source code, so this patch
moves these `config.h` inclusions to be first.
---
src/time-format.c | 2 +-
src/xprintidle-ng.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/time-format.c b/src/time-format.c
index 3a46749..4c0a4d2 100644
--- a/src/time-format.c
+++ b/src/time-format.c
@@ -18,10 +18,10 @@
// 51 Franklin Street, Fifth Floor
// Boston, MA 02110-1301, USA.
+#include <config.h>
#include <stdbool.h>
#include <signal.h>
#include <time.h>
-#include <config.h>
#include "system.h"
#include "xalloc.h"
diff --git a/src/xprintidle-ng.c b/src/xprintidle-ng.c
index 5156adf..ca69b2d 100644
--- a/src/xprintidle-ng.c
+++ b/src/xprintidle-ng.c
@@ -28,13 +28,13 @@
// Eivind Magnus Hvidevold <hvidevold@gmail.com>.
// kpowersave is licensed under the GNU GPL, version 2 _only_.
+#include <config.h>
#include <X11/Xlib.h>
#include <X11/extensions/dpms.h>
#include <X11/extensions/scrnsaver.h>
#include <stdbool.h>
#include <signal.h>
#include <time.h>
-#include <config.h>
#include "system.h"
#include "errno.h"
#include "error.h"
--
2.42.0

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchFromGitHub,
libX11,
libXScrnSaver,
libXext,
gnulib,
autoconf,
automake,
libtool,
gettext,
pkg-config,
git,
perl,
texinfo,
help2man,
}:
stdenv.mkDerivation rec {
pname = "xprintidle-ng";
version = "0-unstable-2015-09-01";
src = fetchFromGitHub {
owner = "taktoa";
repo = "xprintidle-ng";
rev = "9083ba284d9222541ce7da8dc87d5a27ef5cc592";
sha256 = "0a5024vimpfrpj6w60j1ad8qvjkrmxiy8w1yijxfwk917ag9rkpq";
};
patches = [
./fix-config_h-includes-should-be-first.patch
];
postPatch = ''
substituteInPlace configure.ac \
--replace "AC_PREREQ([2.62])" "AC_PREREQ([2.64])"
'';
nativeBuildInputs = [
autoconf
automake
gettext
git
gnulib
help2man
libtool
perl
pkg-config
texinfo
];
configurePhase = ''
runHook preConfigure
./bootstrap --gnulib-srcdir=${gnulib}
./configure --prefix="$out"
runHook postConfigure
'';
buildInputs = [
libX11
libXScrnSaver
libXext
];
meta = {
inherit version;
description = "Command-line tool to print idle time from libXss";
homepage = "https://github.com/taktoa/xprintidle-ng";
license = lib.licenses.gpl2Only;
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.linux;
mainProgram = "xprintidle-ng";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xprintidle";
version = "0.3.0";
src = fetchFromGitHub {
owner = "g0hl1n";
repo = "xprintidle";
rev = finalAttrs.version;
sha256 = "sha256-MawkT4RconRDDCNnaWMxU18lK34ywcebbiHlYeZn/lc=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
xorg.libXScrnSaver
xorg.libX11
xorg.libXext
];
meta = with lib; {
homepage = "https://github.com/g0hl1n/xprintidle";
description = "Utility that queries the X server for the user's idle time and prints it to stdout";
license = licenses.gpl2Only;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.linux;
mainProgram = "xprintidle";
};
})

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchFromGitHub,
writeText,
fontconfig,
libX11,
libXft,
libXinerama,
conf ? null,
nix-update-script,
}:
stdenv.mkDerivation rec {
pname = "xprompt";
version = "2.5.0";
src = fetchFromGitHub {
owner = "phillbush";
repo = "xprompt";
rev = "v${version}";
sha256 = "sha256-pOayKngUlrMY3bFsP4Fi+VsOLKCUQU3tdkZ+0OY1SCo=";
};
buildInputs = [
fontconfig
libX11
libXft
libXinerama
];
postPatch = ''
sed -i "8i #include <time.h>" xprompt.c
''
+ (
let
configFile =
if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.h" conf;
in
lib.optionalString (conf != null) "cp ${configFile} config.h"
);
makeFlags = [
"CC:=$(CC)"
"PREFIX=$(out)"
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Dmenu rip-off with contextual completion";
longDescription = ''
XPrompt is a prompt for X. XPrompt features a text input field where the
user can type in a text subject to tab-completion.
'';
homepage = "https://github.com/phillbush/xprompt";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
mainProgram = "xprompt";
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
libx11,
xorgproto,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "xprop";
version = "1.2.8";
src = fetchurl {
url = "mirror://xorg/individual/app/xprop-${finalAttrs.version}.tar.xz";
hash = "sha256-1onirbfve0OfZGm1HNqKfa78gyQ4VMKjuPhNDwKdZ+4=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libx11
xorgproto
];
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 = "Command line tool to display and/or set window and font properties of an X server";
homepage = "https://gitlab.freedesktop.org/xorg/app/xprop";
license = with lib.licenses; [
mitOpenGroup
hpndSellVariant
mit
];
mainProgram = "xprop";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
zlib,
libpng,
bzip2,
libusb-compat-0_1,
openssl,
}:
stdenv.mkDerivation {
pname = "xpwn";
version = "0.5.8-unstable-2024-04-01";
src = fetchFromGitHub {
owner = "planetbeing";
repo = "xpwn";
rev = "20c32e5c12d1b22a9d55a59a0ff6267f539b77f4";
hash = "sha256-wOSIaeNjZOKoeL4padP6UWY1O75qqHuFuSMrdCOLI2s=";
};
env.NIX_CFLAGS_COMPILE = toString [
# Workaround build failure on -fno-common toolchains:
# ld: ../ipsw-patch/libxpwn.a(libxpwn.c.o):(.bss+0x4): multiple definition of
# `endianness'; CMakeFiles/xpwn-bin.dir/src/xpwn.cpp.o:(.bss+0x0): first defined here
"-fcommon"
# Fix build on GCC 14
"-Wno-implicit-int"
"-Wno-incompatible-pointer-types"
];
preConfigure = ''
rm BUILD # otherwise `mkdir build` fails on case insensitive file systems
sed -r -i \
-e 's/(install.*TARGET.*DESTINATION )\.\)/\1bin)/' \
-e 's!(install.*(FILE|DIR).*DESTINATION )([^)]*)!\1share/xpwn/\3!' \
*/CMakeLists.txt
sed -i -e '/install/d' CMakeLists.txt
'';
strictDeps = true;
nativeBuildInputs = [ cmake ];
buildInputs = [
zlib
libpng
bzip2
libusb-compat-0_1
openssl
];
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
homepage = "http://planetbeing.lighthouseapp.com/projects/15246-xpwn";
description = "Custom NOR firmware loader/IPSW generator for the iPhone";
license = licenses.gpl3Plus;
platforms = with platforms; linux ++ darwin;
};
}