From 5a00711ef84964d7ff076d24ae6ae684cbfa5b6b Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Wed, 13 Feb 2019 19:37:31 +0100 Subject: [PATCH 1/2] x11docker: init at 5.4.1 --- .../virtualization/x11docker/default.nix | 32 ++++++++++++++ pkgs/tools/X11/nx-libs/default.nix | 44 +++++++++++++++++++ pkgs/tools/admin/nxproxy/default.nix | 30 ------------- pkgs/top-level/all-packages.nix | 10 ++++- 4 files changed, 85 insertions(+), 31 deletions(-) create mode 100644 pkgs/applications/virtualization/x11docker/default.nix create mode 100644 pkgs/tools/X11/nx-libs/default.nix delete mode 100644 pkgs/tools/admin/nxproxy/default.nix diff --git a/pkgs/applications/virtualization/x11docker/default.nix b/pkgs/applications/virtualization/x11docker/default.nix new file mode 100644 index 000000000000..8e248061cd5e --- /dev/null +++ b/pkgs/applications/virtualization/x11docker/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, makeWrapper, nx-libs, xorg }: +stdenv.mkDerivation rec { + name = "x11docker-${version}"; + version = "5.4.1"; + src = fetchFromGitHub { + owner = "mviereck"; + repo = "x11docker"; + rev = "v${version}"; + sha256 = "0fcdr8i3crf4cina41h030q2jf5zvafll97iff129dl3sb27jnvi"; + }; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ nx-libs xorg.xhost xorg.xinit ]; + + dontBuild = true; + + PATH_PREFIX = "${nx-libs}/bin:${xorg.xdpyinfo}/bin:${xorg.xhost}/bin:${xorg.xinit}/bin"; + + installPhase = '' + install -D x11docker "$out/bin/x11docker"; + #install -D x11docker-gui "$out/bin/x11docker-gui"; + wrapProgram "$out/bin/x11docker" --prefix PATH : "${PATH_PREFIX}" + #wrapProgram "$out/bin/x11docker-gui" --prefix PATH : "${PATH_PREFIX}" + # GUI disabled because of missing `kaptain` dependency + ''; + + meta = { + description = "Run graphical applications with Docker"; + homepage = https://github.com/mviereck/x11docker; + license = stdenv.lib.licenses.mit; + maintainers = with stdenv.lib.maintainers; [ jD91mZM2 ]; + }; +} diff --git a/pkgs/tools/X11/nx-libs/default.nix b/pkgs/tools/X11/nx-libs/default.nix new file mode 100644 index 000000000000..fb84bcf6a58a --- /dev/null +++ b/pkgs/tools/X11/nx-libs/default.nix @@ -0,0 +1,44 @@ +{ stdenv, autoconf, automake, bash, fetchFromGitHub, libgcc, libjpeg_turbo, + libpng, libtool, libxml2, pkgconfig, which, xorg }: +stdenv.mkDerivation rec { + name = "nx-libs-${version}"; + version = "3.5.99.18"; + src = fetchFromGitHub { + owner = "ArcticaProject"; + repo = "nx-libs"; + rev = version; + sha256 = "07559zk9flzfnyr2ngcdr3nzccga4bl30wghalhrvpgpyljivdyv"; + }; + + nativeBuildInputs = [ autoconf automake libtool pkgconfig which + xorg.gccmakedep xorg.imake ]; + buildInputs = [ libgcc libjpeg_turbo libpng libxml2 xorg.fontutil + xorg.libXcomposite xorg.libXdamage xorg.libXdmcp xorg.libXext xorg.libXfont2 + xorg.libXinerama xorg.libXpm xorg.libXrandr xorg.libXtst xorg.pixman + xorg.xkbcomp xorg.xkeyboardconfig ]; + + enableParallelBuilding = true; + + postPatch = '' + find . -type f -executable -exec sed -i 's|^#!/bin/bash$|#!${bash}/bin/bash|g' {} \; + find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${bash}/bin/bash|g' {} \; + ln -s libNX_X11.so.6.3.0 + ''; + + PREFIX=""; # Don't install to $out/usr/local + installPhase = '' + make DESTDIR="$out" install + # See: + # - https://salsa.debian.org/debian-remote-team/nx-libs/blob/bcc152100617dc59156015a36603a15db530a64f/debian/rules#L66-72 + # - https://github.com/ArcticaProject/nx-libs/issues/652 + patchelf --remove-needed "libX11.so.6" $out/bin/nxagent + ''; + + meta = { + description = "NX X server based on Xnest"; + homepage = https://github.com/ArcticaProject/nx-libs; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ jD91mZM2 ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/tools/admin/nxproxy/default.nix b/pkgs/tools/admin/nxproxy/default.nix deleted file mode 100644 index 45ec8bb72e3b..000000000000 --- a/pkgs/tools/admin/nxproxy/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchurl, autoreconfHook, pkgconfig, libxcomp }: - -stdenv.mkDerivation rec { - name = "nxproxy-${version}"; - version = "3.5.99.17-1"; - - src = fetchurl { - sha256 = "18a7cvjnaf50lf1cc5axx9jmi8n9g75d2i5y4s6q9r3phpwyp918"; - url = "https://code.x2go.org/releases/source/nx-libs/nx-libs-${version}-lite.tar.gz"; - }; - - buildInputs = [ libxcomp ]; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; - - preAutoreconf = '' - cd nxproxy/ - sed -i 's|-L\$(top_srcdir)/../nxcomp/src/.libs ||' src/Makefile.am - ''; - - makeFlags = [ "exec_prefix=$(out)" ]; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "NX compression proxy"; - homepage = http://wiki.x2go.org/doku.php/wiki:libs:nx-libs; - license = licenses.gpl2; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 54adc5a498db..dc4eb16f9f54 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1568,6 +1568,8 @@ in nwipe = callPackage ../tools/security/nwipe { }; + nx-libs = callPackage ../tools/X11/nx-libs { }; + nyx = callPackage ../tools/networking/nyx { }; onboard = callPackage ../applications/misc/onboard { }; @@ -4517,7 +4519,11 @@ in nylon = callPackage ../tools/networking/nylon { }; - nxproxy = callPackage ../tools/admin/nxproxy { }; + nxproxy = throw '' + nxproxy has been replaced by nx-libs which builds both nxagent and nxproxy. + This is because the nx-libs upstream repository can not build nxagent + without also building nxproxy. See nixpkgs#55723 + ''; nzbget = callPackage ../tools/networking/nzbget { }; @@ -23137,6 +23143,8 @@ in x11idle = callPackage ../tools/misc/x11idle {}; + x11docker = callPackage ../applications/virtualization/x11docker { }; + x2x = callPackage ../tools/X11/x2x { }; xboxdrv = callPackage ../misc/drivers/xboxdrv { }; From 346df14000fa4c839b39b3e0c36f0fb2b16f325a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 16 Feb 2019 05:00:11 +0100 Subject: [PATCH 2/2] nx-libs: minor fixes * Add an alias with a deprecation warning for `nxproxy` to avoid an immediate breaking change. * Use the default shell used in the build environment (`stdenv.shell`) for patching. This shell is in the environment and thus used to patch scripts using `patchShebangs`. The shell is referenced as `stdenv.shell` in Makefiles to patch the remaining occurrences of `/bin/bash` in the build environment. --- pkgs/tools/X11/nx-libs/default.nix | 4 ++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 6 ------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/X11/nx-libs/default.nix b/pkgs/tools/X11/nx-libs/default.nix index fb84bcf6a58a..bd81ab9d8fd7 100644 --- a/pkgs/tools/X11/nx-libs/default.nix +++ b/pkgs/tools/X11/nx-libs/default.nix @@ -20,8 +20,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; postPatch = '' - find . -type f -executable -exec sed -i 's|^#!/bin/bash$|#!${bash}/bin/bash|g' {} \; - find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${bash}/bin/bash|g' {} \; + patchShebangs . + find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${stdenv.shell}|g' {} \; ln -s libNX_X11.so.6.3.0 ''; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 4442453644c7..0f1effd71406 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -209,6 +209,7 @@ mapAliases ({ nilfs_utils = nilfs-utils; # added 2018-04-25 nmap_graphical = nmap-graphical; # added 2017-01-19 nologin = shadow; # added 2018-04-25 + nxproxy = lib.warn "nxproxy will be removed soon, use `nx-libs` instead" nx-libs; # added 2019-02-15 opencascade_oce = opencascade; # added 2018-04-25 opencl-icd = ocl-icd; # added 2017-01-20 openexr_ctl = ctl; # added 2018-04-25 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc4eb16f9f54..b65ecf238dd9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4519,12 +4519,6 @@ in nylon = callPackage ../tools/networking/nylon { }; - nxproxy = throw '' - nxproxy has been replaced by nx-libs which builds both nxagent and nxproxy. - This is because the nx-libs upstream repository can not build nxagent - without also building nxproxy. See nixpkgs#55723 - ''; - nzbget = callPackage ../tools/networking/nzbget { }; oathToolkit = callPackage ../tools/security/oath-toolkit { inherit (gnome2) gtkdoc; };