summary refs log tree commit diff
path: root/pkgs/development/libraries/python-qt/default.nix
blob: 6f2550ca9aca72a5bd7833ec73f9a0d9253434a4 (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
{ stdenv, fetchurl, python, qmake,
  qtwebengine, qtxmlpatterns,
  qttools, unzip }:

stdenv.mkDerivation rec {
  version = "3.2";
  pname = "python-qt";

  src = fetchurl {
    url="mirror://sourceforge/pythonqt/PythonQt${version}.zip";
    sha256="13hzprk58m3yj39sj0xn6acg8796lll1256mpd81kw0z3yykyl8c";
  };

  hardeningDisable = [ "all" ];

  nativeBuildInputs = [ qmake qtwebengine  qtxmlpatterns qttools ];

  buildInputs = [ python unzip ];

  qmakeFlags = [ "PythonQt.pro"
                 "INCLUDEPATH+=${python}/include/python3.6"
                 "PYTHON_PATH=${python}/bin"
                 "PYTHON_LIB=${python}/lib"];

  unpackCmd = "unzip $src";

  installPhase = ''
    mkdir -p $out/include/PythonQt
    cp -r ./lib $out
    cp -r ./src/* $out/include/PythonQt
    cp -r ./build $out/include/PythonQt
    cp -r ./extensions $out/include/PythonQt
  '';

  meta = with stdenv.lib; {
    description = "PythonQt is a dynamic Python binding for the Qt framework. It offers an easy way to embed the Python scripting language into your C++ Qt applications";
    homepage = "http://pythonqt.sourceforge.net/";
    license = licenses.lgpl21;
    platforms = platforms.all;
    maintainers = with maintainers; [ hlolli ];
  };
}