3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/X11/nx-libs/default.nix

49 lines
1.6 KiB
Nix
Raw Normal View History

2021-01-15 09:19:50 +00:00
{ lib, stdenv, autoconf, automake, fetchFromGitHub, libgcc, libjpeg_turbo
2020-08-11 20:22:08 +01:00
, libpng, libtool, libxml2, pkgconfig, which, xorg
, libtirpc
}:
2019-02-13 18:37:31 +00:00
stdenv.mkDerivation rec {
pname = "nx-libs";
2020-11-19 05:53:24 +00:00
version = "3.5.99.25";
2019-02-13 18:37:31 +00:00
src = fetchFromGitHub {
owner = "ArcticaProject";
repo = "nx-libs";
rev = version;
2020-11-19 05:53:24 +00:00
sha256 = "01aqdwy0i4nxdyfa24bwnrqjz93q0idihdaqals2yjqpg160nwfc";
2019-02-13 18:37:31 +00:00
};
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
2020-08-11 20:22:08 +01:00
xorg.xkbcomp xorg.xkeyboardconfig libtirpc
];
NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
NIX_LDFLAGS = [ "-ltirpc" ];
2019-02-13 18:37:31 +00:00
postPatch = ''
patchShebangs .
find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${stdenv.shell}|g' {} \;
2019-02-13 18:37:31 +00:00
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";
2021-01-15 09:19:50 +00:00
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ jD91mZM2 ];
platforms = lib.platforms.linux;
2019-02-13 18:37:31 +00:00
};
}