diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-04-22 10:24:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-22 10:24:38 +0200 |
commit | c9d72a6fd49f7b20615019f05aededbb7a5f382c (patch) | |
tree | 033a2aa7221a37c9b6b4ce811df3b9b1f45c174e /pkgs/development | |
parent | 1a8423b70d06dc54d1626cbea10b1801da5bcbf7 (diff) | |
parent | bcaf5dd0fba1a902aa1377971560d6fd82a427dd (diff) |
Merge pull request #302361 from nim65s/pythonqt
python-qt: 3.4.2 -> 3.5.1
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/python-qt/default.nix | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/pkgs/development/libraries/python-qt/default.nix b/pkgs/development/libraries/python-qt/default.nix index d238b8137d337..16c2124cf0831 100644 --- a/pkgs/development/libraries/python-qt/default.nix +++ b/pkgs/development/libraries/python-qt/default.nix @@ -1,39 +1,42 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, python, qmake, - qtwebengine, qtxmlpatterns, - qttools, unzip }: +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + python3, + qmake, + qtwebengine, + qtxmlpatterns, + qttools, +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "python-qt"; - version = "3.4.2"; + version = "3.5.1"; src = fetchFromGitHub { owner = "MeVisLab"; repo = "pythonqt"; - rev = "v${version}"; - hash = "sha256-xJYOD07ACOKtY3psmfHNSCjm6t0fr8JU9CrL0w5P5G0="; + rev = "v${finalAttrs.version}"; + hash = "sha256-IED6UFk8UTle7g/yPC0nXOEgJwrs6sB/Dk3OTyVgHPo="; }; - # https://github.com/CsoundQt/CsoundQt/blob/develop/BUILDING.md#pythonqt - postPatch = '' - substituteInPlace build/python.prf \ - --replace "PYTHON_VERSION=2.7" "PYTHON_VERSION=${python.pythonVersion}" - ''; - - hardeningDisable = [ "all" ]; - - nativeBuildInputs = [ qmake qtwebengine qtxmlpatterns qttools unzip ]; + nativeBuildInputs = [ + qmake + qttools + qtxmlpatterns + qtwebengine + ]; - buildInputs = [ python ]; + buildInputs = [ python3 ]; qmakeFlags = [ - "PythonQt.pro" - "PYTHON_DIR=${python}" + "PYTHON_DIR=${python3}" + "PYTHON_VERSION=3.${python3.sourceVersion.minor}" ]; dontWrapQtApps = true; - unpackCmd = "unzip $src"; - installPhase = '' mkdir -p $out/include/PythonQt cp -r ./lib $out @@ -42,6 +45,15 @@ stdenv.mkDerivation rec { cp -r ./extensions $out/include/PythonQt ''; + preFixup = lib.optionalString stdenv.isDarwin '' + install_name_tool -id \ + $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib \ + $out/lib/libPythonQt-Qt5-Python3.${python3.sourceVersion.minor}.dylib + install_name_tool -id \ + $out/lib/libPythonQt_QtAll-Qt5-Python3.${python3.sourceVersion.minor}.dylib \ + $out/lib/libPythonQt_QtAll-Qt5-Python3.${python3.sourceVersion.minor}.dylib + ''; + meta = with 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 = "https://pythonqt.sourceforge.net/"; @@ -49,4 +61,4 @@ stdenv.mkDerivation rec { platforms = platforms.all; maintainers = with maintainers; [ hlolli ]; }; -} +}) |