3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/X11/xpra/default.nix

125 lines
3.3 KiB
Nix
Raw Normal View History

2020-03-31 07:29:46 +01:00
{ stdenv, lib, fetchurl, callPackage, substituteAll, python3, pkgconfig, writeText
2019-05-22 12:03:39 +01:00
, xorg, gtk3, glib, pango, cairo, gdk-pixbuf, atk
2020-11-24 15:29:28 +00:00
, wrapGAppsHook, xorgserver, getopt, xauth, util-linux, which
2020-06-13 03:31:01 +01:00
, ffmpeg, x264, libvpx, libwebp, x265
2016-09-03 14:52:39 +01:00
, libfakeXinerama
, gst_all_1, pulseaudio, gobject-introspection
2016-12-04 21:26:43 +00:00
, pam }:
2016-09-03 14:52:39 +01:00
with lib;
let
inherit (python3.pkgs) cython buildPythonApplication;
2018-07-15 09:32:53 +01:00
2020-03-31 07:29:46 +01:00
xf86videodummy = xorg.xf86videodummy.overrideDerivation (p: {
patches = [
./0002-Constant-DPI.patch
./0003-fix-pointer-limits.patch
./0005-support-for-30-bit-depth-in-dummy-driver.patch
];
});
xorgModulePaths = writeText "module-paths" ''
Section "Files"
ModulePath "${xorgserver}/lib/xorg/modules"
ModulePath "${xorgserver}/lib/xorg/modules/extensions"
ModulePath "${xorgserver}/lib/xorg/modules/drivers"
ModulePath "${xf86videodummy}/lib/xorg/modules/drivers"
EndSection
'';
in buildPythonApplication rec {
2018-07-15 09:32:53 +01:00
pname = "xpra";
2020-05-16 20:19:00 +01:00
version = "4.0.2";
src = fetchurl {
2018-07-15 09:32:53 +01:00
url = "https://xpra.org/src/${pname}-${version}.tar.xz";
2020-05-16 20:19:00 +01:00
sha256 = "1cs39jzi59hkl421xmhi549ndmdfzkg0ap45f4nlsn9zr9zwmp3x";
};
patches = [
(substituteAll {
src = ./fix-paths.patch;
inherit (xorg) xkeyboardconfig;
2020-05-16 20:19:00 +01:00
inherit libfakeXinerama;
})
2020-05-17 15:32:41 +01:00
./fix-41106.patch
];
2019-03-22 19:27:55 +00: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 12:03:39 +01:00
pango cairo gdk-pixbuf atk.out gtk3 glib
2020-06-13 03:31:01 +01:00
ffmpeg libvpx x264 libwebp x265
2015-02-24 23:34:58 +00:00
2016-09-03 14:52:39 +01: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 21:26:43 +00:00
pam
2019-03-22 19:27:55 +00:00
gobject-introspection
];
propagatedBuildInputs = with python3.pkgs; [
pillow rencode pycrypto cryptography pycups lz4 dbus-python
2019-03-22 19:27:55 +00:00
netifaces numpy pygobject3 pycairo gst-python pam
pyopengl paramiko opencv4 python-uinput pyxdg
2019-03-22 19:27:55 +00:00
ipaddress idna
];
# error: 'import_cairo' defined but not used
2019-10-30 11:34:47 +00:00
NIX_CFLAGS_COMPILE = "-Wno-error=unused-function";
2013-03-29 01:30:18 +00:00
setupPyBuildFlags = [
"--with-Xdummy"
"--without-strict"
"--with-gtk3"
2019-03-22 19:27:55 +00:00
# Override these, setup.py checks for headers in /usr/* paths
"--with-pam"
"--with-vsock"
];
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--set XPRA_INSTALL_PREFIX "$out"
2020-08-22 21:38:10 +01:00
--set XPRA_COMMAND "$out/bin/xpra"
--prefix LD_LIBRARY_PATH : ${libfakeXinerama}/lib
2020-11-24 15:29:28 +00:00
--prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which util-linux pulseaudio ]}
)
2015-02-24 23:34:58 +00:00
'';
# append module paths to xorg.conf
postInstall = ''
cat ${xorgModulePaths} >> $out/etc/xpra/xorg.conf
'';
doCheck = false;
2015-02-24 23:34:58 +00:00
2019-03-22 19:27:55 +00:00
enableParallelBuilding = true;
2018-07-15 09:32:53 +01:00
passthru = { inherit xf86videodummy; };
2015-02-24 23:34:58 +00:00
meta = {
2020-03-20 18:36:28 +00:00
homepage = "http://xpra.org/";
downloadPage = "https://xpra.org/src/";
downloadURLRegexp = "xpra-.*[.]tar[.]xz$";
description = "Persistent remote applications for X";
2016-09-03 14:52:39 +01:00
platforms = platforms.linux;
2018-09-12 20:42:39 +01:00
license = licenses.gpl2;
2018-07-15 09:32:53 +01:00
maintainers = with maintainers; [ tstrobel offline numinit ];
};
}