1 { wrapPython, python, lib, stdenv, cmake, qt5,
5 pname = "pyside2-tools";
7 inherit (pyside2) version src;
10 # Upstream has a crazy build system only geared towards producing binary
11 # wheels distributed via pypi. For this, they copy the `uic` and `rcc`
12 # binaries to the wheel.
13 ./remove_hacky_binary_copying.patch
17 cd sources/pyside2-tools
20 nativeBuildInputs = [ cmake wrapPython ];
21 propagatedBuildInputs = [ shiboken2 pyside2 ];
22 buildInputs = [ python qt5.qtbase ];
28 dontWrapQtApps = true;
30 # The upstream build system consists of a `setup.py` whichs builds three
31 # different python libraries and calls cmake as a subprocess. We call cmake
32 # directly because that's easier to get working. However, the `setup.py`
33 # build also creates a few wrapper scripts, which we replicate here:
35 rm $out/bin/pyside_tool.py
37 for tool in uic rcc; do
38 makeWrapper "$(command -v $tool)" $out/bin/pyside2-$tool --add-flags "-g python"
47 description = "PySide2 development tools";
48 license = licenses.gpl2;
49 homepage = "https://wiki.qt.io/Qt_for_Python";
50 maintainers = with maintainers; [ gebner ];