1 { lib, stdenv, autoconf, automake, fetchFromGitHub, fetchpatch
3 , libpng, libtool, libxml2, pkg-config, which, xorg
6 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
10 owner = "ArcticaProject";
13 sha256 = "sha256-qVOdD85sBMxKYx1cSLAGKeODsKKAm9UPBmYzPBbBOzQ=";
18 name = "binutils-2.36.patch";
19 url = "https://github.com/ArcticaProject/nx-libs/commit/605a266911b50ababbb3f8a8b224efb42743379c.patch";
20 sha256 = "sha256-kk5ms3i0PrHL74I4OlsqDrdDcCJ0us03cQcBy4zjAoQ=";
24 nativeBuildInputs = [ autoconf automake libtool pkg-config which
25 xorg.gccmakedep xorg.imake ];
26 buildInputs = [ libjpeg_turbo libpng libxml2 xorg.fontutil
27 xorg.libXcomposite xorg.libXdamage xorg.libXdmcp xorg.libXext xorg.libXfont2
28 xorg.libXinerama xorg.libXpm xorg.libXrandr xorg.libXtst xorg.pixman
29 xorg.xkbcomp xorg.xkeyboardconfig libtirpc
32 env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
33 NIX_LDFLAGS = [ "-ltirpc" ];
37 find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${stdenv.shell}|g' {} \;
38 ln -s libNX_X11.so.6.3.0
43 # https://github.com/ArcticaProject/nx-libs/issues/1003
44 substituteInPlace nx-X11/config/cf/Imake.tmpl --replace "clq" "cq"
47 PREFIX=""; # Don't install to $out/usr/local
49 make DESTDIR="$out" install
51 # - https://salsa.debian.org/debian-remote-team/nx-libs/blob/bcc152100617dc59156015a36603a15db530a64f/debian/rules#L66-72
52 # - https://github.com/ArcticaProject/nx-libs/issues/652
53 patchelf --remove-needed "libX11.so.6" $out/bin/nxagent
57 description = "NX X server based on Xnest";
58 homepage = "https://github.com/ArcticaProject/nx-libs";
59 license = lib.licenses.gpl2Only;
61 platforms = lib.platforms.linux;