summary refs log tree commit diff
path: root/pkgs/tools/admin/virtscreen/default.nix
blob: ebfd6c21772ff1585771955483c31b8d060b9fa3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib, stdenv, fetchFromGitHub, python3Packages, x11vnc, xrandr, libGL }:

python3Packages.buildPythonApplication rec {
  pname = "virtscreen";
  version = "0.3.1";

  disabled = python3Packages.pythonOlder "3.6";

  # No tests
  doCheck = false;

  src = fetchFromGitHub {
    owner = "kbumsik";
    repo = pname;
    rev = version;
    sha256 = "005qach6phz8w17k8kqmyd647c6jkfybczybxq0yxi5ik0s91a08";
  };

  propagatedBuildInputs = with python3Packages; [
    netifaces
    pyqt5
    quamash
    x11vnc
    xrandr
  ];

  postPatch = let
    ext = stdenv.hostPlatform.extensions.sharedLibrary; in ''
    substituteInPlace virtscreen/__main__.py \
      --replace "'GL'" "'${libGL}/lib/libGL${ext}'" \
  '';

  meta = with lib; {
    description = "Make your iPad/tablet/computer as a secondary monitor on Linux";
    homepage = "https://github.com/kbumsik/VirtScreen";
    license = licenses.gpl3;
    maintainers = with maintainers; [ borisbabic ];
  };
}