at 24.11-pre 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 python3, 7 qmake, 8 qtwebengine, 9 qtxmlpatterns, 10 qttools, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "python-qt"; 15 version = "3.5.2"; 16 17 src = fetchFromGitHub { 18 owner = "MeVisLab"; 19 repo = "pythonqt"; 20 rev = "v${finalAttrs.version}"; 21 hash = "sha256-Mpi1pAPS/UuzaBK7I1kI0HlS3dphcKiVXIPuJwdEDXM="; 22 }; 23 24 nativeBuildInputs = [ 25 qmake 26 qttools 27 qtxmlpatterns 28 qtwebengine 29 ]; 30 31 buildInputs = [ python3 ]; 32 33 qmakeFlags = [ 34 "PYTHON_DIR=${python3}" 35 "PYTHON_VERSION=3.${python3.sourceVersion.minor}" 36 ]; 37 38 dontWrapQtApps = true; 39 40 installPhase = '' 41 mkdir -p $out/include/PythonQt 42 cp -r ./lib $out 43 cp -r ./src/* $out/include/PythonQt 44 cp -r ./build $out/include/PythonQt 45 cp -r ./extensions $out/include/PythonQt 46 ''; 47 48 preFixup = lib.optionalString stdenv.isDarwin '' 49 install_name_tool -id \ 50 $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib \ 51 $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib 52 install_name_tool -id \ 53 $out/lib/libPythonQt_QtAll-Qt5-Python3.${python3.sourceVersion.minor}.dylib \ 54 $out/lib/libPythonQt_QtAll-Qt5-Python3.${python3.sourceVersion.minor}.dylib 55 ''; 56 57 meta = with lib; { 58 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"; 59 homepage = "https://pythonqt.sourceforge.net/"; 60 license = licenses.lgpl21; 61 platforms = platforms.all; 62 maintainers = with maintainers; [ hlolli ]; 63 }; 64})