mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-16 22:49:25 +03:00
turbovnc: 3.1.4 -> 3.2 (#410000)
This commit is contained in:
commit
79d99fd96f
2 changed files with 26 additions and 33 deletions
|
@ -120,24 +120,6 @@ import ./make-test-python.nix (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Checks that we detect glxgears failing when
|
|
||||||
# `LIBGL_DRIVERS_PATH=/nonexistent` is set
|
|
||||||
# (in which case software rendering should not work).
|
|
||||||
def test_glxgears_failing_with_bad_driver_path():
|
|
||||||
machine.execute(
|
|
||||||
# Note trailing & for backgrounding.
|
|
||||||
"(env DISPLAY=:0 LIBGL_DRIVERS_PATH=/nonexistent glxgears -info | tee /tmp/glxgears-should-fail.stdout) 3>&1 1>&2 2>&3 | tee /tmp/glxgears-should-fail.stderr >&2 &"
|
|
||||||
)
|
|
||||||
machine.wait_until_succeeds("test -f /tmp/glxgears-should-fail.stderr")
|
|
||||||
wait_until_terminated_or_succeeds(
|
|
||||||
termination_check_shell_command="pidof glxgears",
|
|
||||||
success_check_shell_command="grep 'MESA-LOADER: failed to open swrast' /tmp/glxgears-should-fail.stderr",
|
|
||||||
get_detail_message_fn=lambda: "Contents of /tmp/glxgears-should-fail.stderr:\n"
|
|
||||||
+ machine.succeed("cat /tmp/glxgears-should-fail.stderr"),
|
|
||||||
)
|
|
||||||
machine.wait_until_fails("pidof glxgears")
|
|
||||||
|
|
||||||
|
|
||||||
# Starts glxgears, backgrounding it. Waits until it prints the `GL_RENDERER`.
|
# Starts glxgears, backgrounding it. Waits until it prints the `GL_RENDERER`.
|
||||||
# Does not quit glxgears.
|
# Does not quit glxgears.
|
||||||
def test_glxgears_prints_renderer():
|
def test_glxgears_prints_renderer():
|
||||||
|
@ -158,9 +140,6 @@ import ./make-test-python.nix (
|
||||||
start_xvnc()
|
start_xvnc()
|
||||||
wait_until_xvnc_glx_ready()
|
wait_until_xvnc_glx_ready()
|
||||||
|
|
||||||
with subtest("Ensure bad driver path makes glxgears fail"):
|
|
||||||
test_glxgears_failing_with_bad_driver_path()
|
|
||||||
|
|
||||||
with subtest("Run 3D application (glxgears)"):
|
with subtest("Run 3D application (glxgears)"):
|
||||||
test_glxgears_prints_renderer()
|
test_glxgears_prints_renderer()
|
||||||
|
|
||||||
|
@ -170,8 +149,6 @@ import ./make-test-python.nix (
|
||||||
# Copy files down.
|
# Copy files down.
|
||||||
machine.copy_from_vm("/tmp/glxgears.png")
|
machine.copy_from_vm("/tmp/glxgears.png")
|
||||||
machine.copy_from_vm("/tmp/glxgears.stdout")
|
machine.copy_from_vm("/tmp/glxgears.stdout")
|
||||||
machine.copy_from_vm("/tmp/glxgears-should-fail.stdout")
|
|
||||||
machine.copy_from_vm("/tmp/glxgears-should-fail.stderr")
|
|
||||||
machine.copy_from_vm("/tmp/Xvnc.stdout")
|
machine.copy_from_vm("/tmp/Xvnc.stdout")
|
||||||
machine.copy_from_vm("/tmp/Xvnc.stderr")
|
machine.copy_from_vm("/tmp/Xvnc.stderr")
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -27,20 +27,24 @@
|
||||||
xkeyboard_config,
|
xkeyboard_config,
|
||||||
xorg,
|
xorg,
|
||||||
xterm,
|
xterm,
|
||||||
zlib,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "turbovnc";
|
pname = "turbovnc";
|
||||||
version = "3.1.4";
|
version = "3.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "TurboVNC";
|
owner = "TurboVNC";
|
||||||
repo = "turbovnc";
|
repo = "turbovnc";
|
||||||
rev = finalAttrs.version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-Qt9yGyGWKFBppO91D+hUfmN7CMg0I66rAXyRoCYUOEA=";
|
hash = "sha256-CMJdUG4Dd7pbtr/KXq0hV+zR5i+L/y610O+SWJTR/zQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Notes:
|
||||||
|
# * SSH support does not require `openssh` on PATH, because turbovnc
|
||||||
|
# uses a built-in SSH client ("JSch fork"), as commented on e.g.:
|
||||||
|
# https://github.com/TurboVNC/turbovnc/releases/tag/3.2beta1
|
||||||
|
#
|
||||||
# TODO:
|
# TODO:
|
||||||
# * Build outputs that are unclear:
|
# * Build outputs that are unclear:
|
||||||
# * `-- FONT_ENCODINGS_DIRECTORY = /var/empty/share/X11/fonts/encodings`
|
# * `-- FONT_ENCODINGS_DIRECTORY = /var/empty/share/X11/fonts/encodings`
|
||||||
|
@ -48,7 +52,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
# do with their `fontDirectories`?
|
# do with their `fontDirectories`?
|
||||||
# * `XORG_REGISTRY_PATH = /var/empty/lib64/xorg`
|
# * `XORG_REGISTRY_PATH = /var/empty/lib64/xorg`
|
||||||
# * The thing about xorg `protocol.txt`
|
# * The thing about xorg `protocol.txt`
|
||||||
# * Does SSH support require `openssh` on PATH?
|
|
||||||
# * Add `enableClient ? true` flag that disables the client GUI
|
# * Add `enableClient ? true` flag that disables the client GUI
|
||||||
# so that the server can be built without openjdk dependency.
|
# so that the server can be built without openjdk dependency.
|
||||||
# * Perhaps allow to build the client on non-Linux platforms.
|
# * Perhaps allow to build the client on non-Linux platforms.
|
||||||
|
@ -72,7 +75,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
openssl
|
openssl
|
||||||
pam
|
pam
|
||||||
perl
|
perl
|
||||||
zlib
|
|
||||||
]
|
]
|
||||||
++ (with xorg; [
|
++ (with xorg; [
|
||||||
libfontenc # for -DTVNC_SYSTEMX11=1
|
libfontenc # for -DTVNC_SYSTEMX11=1
|
||||||
|
@ -83,6 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
libXext
|
libXext
|
||||||
libXfont2 # for -DTVNC_SYSTEMX11=1
|
libXfont2 # for -DTVNC_SYSTEMX11=1
|
||||||
libxkbfile # for -DTVNC_SYSTEMX11=1
|
libxkbfile # for -DTVNC_SYSTEMX11=1
|
||||||
|
libxshmfence
|
||||||
libXi
|
libXi
|
||||||
mesa-gl-headers # for -DTVNC_SYSTEMX11=1
|
mesa-gl-headers # for -DTVNC_SYSTEMX11=1
|
||||||
pixman # for -DTVNC_SYSTEMX11=1
|
pixman # for -DTVNC_SYSTEMX11=1
|
||||||
|
@ -103,14 +106,27 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
# -dridir /nix/store/...-mesa-20.1.10-drivers/lib/dri/
|
# -dridir /nix/store/...-mesa-20.1.10-drivers/lib/dri/
|
||||||
"-DXORG_DRI_DRIVER_PATH=${libGL.driverLink}/lib/dri"
|
"-DXORG_DRI_DRIVER_PATH=${libGL.driverLink}/lib/dri"
|
||||||
# The build system doesn't find these files automatically.
|
# The build system doesn't find these files automatically.
|
||||||
"-DTJPEG_JAR=${libjpeg_turbo.out}/share/java/turbojpeg.jar"
|
|
||||||
"-DTJPEG_JNILIBRARY=${libjpeg_turbo.out}/lib/libturbojpeg.so"
|
|
||||||
"-DXKB_BASE_DIRECTORY=${xkeyboard_config}/share/X11/xkb"
|
"-DXKB_BASE_DIRECTORY=${xkeyboard_config}/share/X11/xkb"
|
||||||
"-DXKB_BIN_DIRECTORY=${xkbcomp}/bin"
|
"-DXKB_BIN_DIRECTORY=${xkbcomp}/bin"
|
||||||
# use system libs
|
# use system libs
|
||||||
"-DTVNC_SYSTEMLIBS=1"
|
# TurboVNC >= 3.1.4 no longer needs overrides to use system libraries
|
||||||
"-DTVNC_SYSTEMX11=1"
|
# instead of bundling them, see
|
||||||
"-DTVNC_DLOPENSSL=0"
|
# https://github.com/TurboVNC/turbovnc/releases/tag/3.2beta1:
|
||||||
|
# > The TVNC_SYSTEMLIBS and TVNC_SYSTEMX11 CMake variables have been removed,
|
||||||
|
# > and the build system now behaves as if those variables are always on.
|
||||||
|
# > A new CMake variable (TVNC_ZLIBNG) can be used on x86 platforms
|
||||||
|
# > to disable the in-tree SIMD-accelerated zlib-ng implementation
|
||||||
|
# > and build against the system-supplied zlib implementation.
|
||||||
|
#
|
||||||
|
# We'd like to build against nixpkgs's `zlib-ng`, but if we pass
|
||||||
|
# `-DTVNC_ZLIBNG=0`, the above logic seems to imply that it looks
|
||||||
|
# for normal zlib as well, and the `./configure` output prints
|
||||||
|
# -- zlib-ng disabled (TVNC_ZLIBNG = 0)
|
||||||
|
# -- Found ZLIB: /nix/store/srby6wmvg7dp454pwb6qvaxdiri38sc1-zlib-1.3.1/lib/libz.so (found version "1.3.1")
|
||||||
|
# so that seems to use normal `zlib`, even though it's not declared
|
||||||
|
# as a dependency here (probably it's part of `stdenv`).
|
||||||
|
# So for now, we use TruboVNC's in-tree `zlib-ng`.
|
||||||
|
# "-DTVNC_ZLIBNG=0" # not given currently as explained above
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue