Unverified Commit 4d98d486 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

tigervnc: 1.15.0 -> 1.16.0, support building w0vncserver (#485823)

parents d9e07c6f 39645367
Loading
Loading
Loading
Loading
+24 −6
Original line number Diff line number Diff line
@@ -43,17 +43,23 @@
  ffmpeg,
  autoconf,
  automake,
  libuuid,
  libxkbcommon,
  pipewire,
  wayland,
  wayland-scanner,
  waylandSupport ? stdenv.hostPlatform.isLinux,
}:

stdenv.mkDerivation (finalAttrs: {
  version = "1.15.0";
  version = "1.16.0";
  pname = "tigervnc";

  src = fetchFromGitHub {
    owner = "TigerVNC";
    repo = "tigervnc";
    tag = "v${finalAttrs.version}";
    hash = "sha256-ZuuvRJe/lAqULWObPxGHVJrDPCTK4IVSqX0K1rWOctw=";
    hash = "sha256-aIQcFX4GQ0VniacjYherpUSgzM55Han9oMvbjMUYgfE=";
  };

  postPatch =
@@ -61,7 +67,7 @@ stdenv.mkDerivation (finalAttrs: {
      sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${xkeyboard_config}/etc/X11/xkb";' unix/vncserver/vncserver.in
      fontPath=
      substituteInPlace vncviewer/vncviewer.cxx \
         --replace '"/usr/bin/ssh' '"${openssh}/bin/ssh'
         --replace-fail '"/usr/bin/ssh' '"${openssh}/bin/ssh'
      source_top="$(pwd)"
    ''
    + ''
@@ -73,9 +79,12 @@ stdenv.mkDerivation (finalAttrs: {
  dontUseCmakeBuildDir = true;

  cmakeFlags = [
    "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
    "-DCMAKE_INSTALL_SBINDIR=${placeholder "out"}/bin"
    "-DCMAKE_INSTALL_LIBEXECDIR=${placeholder "out"}/bin"
    (lib.cmakeFeature "CMAKE_INSTALL_PREFIX" (placeholder "out"))
    (lib.cmakeFeature "CMAKE_INSTALL_SBINDIR" "${placeholder "out"}/bin")
    (lib.cmakeFeature "CMAKE_INSTALL_LIBEXECDIR" "${placeholder "out"}/bin")
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    (lib.cmakeBool "ENABLE_WAYLAND" waylandSupport)
  ];

  env.NIX_CFLAGS_COMPILE = toString [
@@ -172,6 +181,12 @@ stdenv.mkDerivation (finalAttrs: {
      libxdamage
    ]
    ++ xorg-server.buildInputs
    ++ lib.optionals waylandSupport [
      libuuid
      libxkbcommon
      pipewire
      wayland
    ]
  );

  nativeBuildInputs = [
@@ -189,6 +204,9 @@ stdenv.mkDerivation (finalAttrs: {
      zlib
    ]
    ++ xorg-server.nativeBuildInputs
    ++ lib.optionals waylandSupport [
      wayland-scanner
    ]
  );

  propagatedBuildInputs = lib.optional stdenv.hostPlatform.isLinux xorg-server.propagatedBuildInputs;