summary refs log tree commit diff
path: root/pkgs/development/python-modules/deskcon/default.nix
blob: 01918445b3421d8ad339057f0d28a39f365d50e9 (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
40
41
42
{ lib, stdenv
, buildPythonPackage
, pyopenssl
, pkgs
, isPy3k
, python
}:

buildPythonPackage {
  pname = "deskcon";
  version = "0.3";
  disabled = isPy3k;

  src = pkgs.fetchFromGitHub {
    owner= "screenfreeze";
    repo = "deskcon-desktop";
    rev = "267804122188fa79c37f2b21f54fe05c898610e6";
    sha256 ="0i1dd85ls6n14m9q7lkympms1w3x0pqyaxvalq82s4xnjdv585j3";
  };

  phases = [ "unpackPhase" "installPhase" ];

  pythonPath = [ pyopenssl pkgs.gtk3 ];

  installPhase = ''
    substituteInPlace server/deskcon-server --replace "python2" "python"

    mkdir -p $out/bin
    mkdir -p $out/lib/${python.libPrefix}/site-packages
    cp -r "server/"* $out/lib/${python.libPrefix}/site-packages
    mv $out/lib/${python.libPrefix}/site-packages/deskcon-server $out/bin/deskcon-server

    wrapPythonProgramsIn $out/bin "$out $pythonPath"
  '';

  meta = with lib; {
    description = "Integrates an Android device into a desktop";
    homepage = "https://github.com/screenfreeze/deskcon-desktop";
    license = licenses.gpl3;
  };

}