2021-11-21 17:26:29 +01:00
|
|
|
{ lib, stdenv, autoconf, automake, fetchFromGitHub, fetchpatch
|
2023-05-13 14:56:31 +02:00
|
|
|
, libjpeg_turbo
|
2021-01-17 10:17:16 +01:00
|
|
|
, libpng, libtool, libxml2, pkg-config, which, xorg
|
2020-08-11 21:22:08 +02:00
|
|
|
, libtirpc
|
|
|
|
}:
|
2019-02-13 19:37:31 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "nx-libs";
|
2021-02-08 01:01:49 +01:00
|
|
|
version = "3.5.99.26";
|
2019-02-13 19:37:31 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ArcticaProject";
|
|
|
|
repo = "nx-libs";
|
|
|
|
rev = version;
|
2021-02-08 01:01:49 +01:00
|
|
|
sha256 = "sha256-qVOdD85sBMxKYx1cSLAGKeODsKKAm9UPBmYzPBbBOzQ=";
|
2019-02-13 19:37:31 +01:00
|
|
|
};
|
|
|
|
|
2021-11-21 17:26:29 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "binutils-2.36.patch";
|
|
|
|
url = "https://github.com/ArcticaProject/nx-libs/commit/605a266911b50ababbb3f8a8b224efb42743379c.patch";
|
|
|
|
sha256 = "sha256-kk5ms3i0PrHL74I4OlsqDrdDcCJ0us03cQcBy4zjAoQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-17 10:17:16 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool pkg-config which
|
2019-02-13 19:37:31 +01:00
|
|
|
xorg.gccmakedep xorg.imake ];
|
2023-05-13 14:56:31 +02:00
|
|
|
buildInputs = [ libjpeg_turbo libpng libxml2 xorg.fontutil
|
2019-02-13 19:37:31 +01:00
|
|
|
xorg.libXcomposite xorg.libXdamage xorg.libXdmcp xorg.libXext xorg.libXfont2
|
|
|
|
xorg.libXinerama xorg.libXpm xorg.libXrandr xorg.libXtst xorg.pixman
|
2020-08-11 21:22:08 +02:00
|
|
|
xorg.xkbcomp xorg.xkeyboardconfig libtirpc
|
|
|
|
];
|
|
|
|
|
2023-02-19 20:23:32 +01:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
|
2020-08-11 21:22:08 +02:00
|
|
|
NIX_LDFLAGS = [ "-ltirpc" ];
|
2019-02-13 19:37:31 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-02-16 05:00:11 +01:00
|
|
|
patchShebangs .
|
|
|
|
find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${stdenv.shell}|g' {} \;
|
2019-02-13 19:37:31 +01:00
|
|
|
ln -s libNX_X11.so.6.3.0
|
|
|
|
'';
|
|
|
|
|
2021-08-21 23:08:31 +02:00
|
|
|
preConfigure = ''
|
|
|
|
# binutils 2.37 fix
|
|
|
|
# https://github.com/ArcticaProject/nx-libs/issues/1003
|
|
|
|
substituteInPlace nx-X11/config/cf/Imake.tmpl --replace "clq" "cq"
|
|
|
|
'';
|
|
|
|
|
2019-02-13 19:37:31 +01:00
|
|
|
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";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ArcticaProject/nx-libs";
|
2024-04-26 13:35:31 +02:00
|
|
|
license = lib.licenses.gpl2Only;
|
2021-02-28 17:43:38 +01:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2021-01-15 10:19:50 +01:00
|
|
|
platforms = lib.platforms.linux;
|
2019-02-13 19:37:31 +01:00
|
|
|
};
|
|
|
|
}
|