nixpkgs/pkgs/tools/X11/xpra/default.nix

102 lines
2.5 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchurl, callPackage, substituteAll, python3, pkgconfig
2019-05-22 13:03:39 +02:00
, xorg, gtk3, glib, pango, cairo, gdk-pixbuf, atk
, wrapGAppsHook, xorgserver, getopt, xauth, utillinux, which
2019-03-22 20:27:55 +01:00
, ffmpeg_4, x264, libvpx, libwebp, x265
2016-09-03 15:52:39 +02:00
, libfakeXinerama
, gst_all_1, pulseaudio, gobject-introspection
2016-12-04 22:26:43 +01:00
, pam }:
2016-09-03 15:52:39 +02:00
with lib;
let
inherit (python3.pkgs) cython buildPythonApplication;
2018-07-15 10:32:53 +02:00
xf86videodummy = callPackage ./xf86videodummy { };
in buildPythonApplication rec {
2018-07-15 10:32:53 +02:00
pname = "xpra";
version = "2.5.3";
src = fetchurl {
2018-07-15 10:32:53 +02:00
url = "https://xpra.org/src/${pname}-${version}.tar.xz";
sha256 = "1ys35lj28903alccks9p055psy1fsk1nxi8ncchvw8bfxkkkvbys";
};
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit (xorg) xkeyboardconfig;
})
];
2019-03-22 20:27:55 +01:00
postPatch = ''
substituteInPlace setup.py --replace '/usr/include/security' '${pam}/include/security'
'';
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
buildInputs = with xorg; [
libX11 xorgproto libXrender libXi
libXtst libXfixes libXcomposite libXdamage
libXrandr libxkbfile
] ++ [
cython
2019-05-22 13:03:39 +02:00
pango cairo gdk-pixbuf atk.out gtk3 glib
2019-03-22 20:27:55 +01:00
ffmpeg_4 libvpx x264 libwebp x265
2015-02-25 00:34:58 +01:00
2016-09-03 15:52:39 +02:00
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-libav
2016-12-04 22:26:43 +01:00
pam
2019-03-22 20:27:55 +01:00
gobject-introspection
];
propagatedBuildInputs = with python3.pkgs; [
pillow rencode pycrypto cryptography pycups lz4 dbus-python
2019-03-22 20:27:55 +01:00
netifaces numpy pygobject3 pycairo gst-python pam
pyopengl paramiko opencv4 python-uinput pyxdg
2019-03-22 20:27:55 +01:00
ipaddress idna
];
NIX_CFLAGS_COMPILE = [
# error: 'import_cairo' defined but not used
"-Wno-error=unused-function"
2013-03-29 02:30:18 +01:00
];
setupPyBuildFlags = [
"--with-Xdummy"
"--without-strict"
"--with-gtk3"
"--without-gtk2"
2019-03-22 20:27:55 +01:00
# Override these, setup.py checks for headers in /usr/* paths
"--with-pam"
"--with-vsock"
];
preFixup = ''
gappsWrapperArgs+=(
--set XPRA_INSTALL_PREFIX "$out"
--prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib
--prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux pulseaudio ]}
)
2015-02-25 00:34:58 +01:00
'';
doCheck = false;
2015-02-25 00:34:58 +01:00
2019-03-22 20:27:55 +01:00
enableParallelBuilding = true;
2018-07-15 10:32:53 +02:00
passthru = { inherit xf86videodummy; };
2015-02-25 00:34:58 +01:00
meta = {
homepage = http://xpra.org/;
downloadPage = "https://xpra.org/src/";
downloadURLRegexp = "xpra-.*[.]tar[.]xz$";
description = "Persistent remote applications for X";
2016-09-03 15:52:39 +02:00
platforms = platforms.linux;
2018-09-12 21:42:39 +02:00
license = licenses.gpl2;
2018-07-15 10:32:53 +02:00
maintainers = with maintainers; [ tstrobel offline numinit ];
};
}