1{ stdenv
2, buildPythonPackage
3, pyopenssl
4, pkgs
5, isPy3k
6, python
7}:
8
9buildPythonPackage rec {
10 name = "deskcon-0.3";
11 disabled = isPy3k;
12
13 src = pkgs.fetchFromGitHub {
14 owner= "screenfreeze";
15 repo = "deskcon-desktop";
16 rev = "267804122188fa79c37f2b21f54fe05c898610e6";
17 sha256 ="0i1dd85ls6n14m9q7lkympms1w3x0pqyaxvalq82s4xnjdv585j3";
18 };
19
20 phases = [ "unpackPhase" "installPhase" ];
21
22 pythonPath = [ pyopenssl pkgs.gtk3 ];
23
24 installPhase = ''
25 substituteInPlace server/deskcon-server --replace "python2" "python"
26
27 mkdir -p $out/bin
28 mkdir -p $out/lib/${python.libPrefix}/site-packages
29 cp -r "server/"* $out/lib/${python.libPrefix}/site-packages
30 mv $out/lib/${python.libPrefix}/site-packages/deskcon-server $out/bin/deskcon-server
31
32 wrapPythonProgramsIn $out/bin "$out $pythonPath"
33 '';
34
35 meta = with stdenv.lib; {
36 description = "Integrates an Android device into a desktop";
37 homepage = https://github.com/screenfreeze/deskcon-desktop;
38 license = licenses.gpl3;
39 };
40
41}