evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pyside2-tools / default.nix
blob0bfcb985d949cf71ee693fd7298bea389e19b8af
2   wrapPython,
3   python,
4   lib,
5   stdenv,
6   cmake,
7   qt5,
8   shiboken2,
9   pyside2,
12 stdenv.mkDerivation {
13   pname = "pyside2-tools";
15   inherit (pyside2) version src;
17   patches = [
18     # Upstream has a crazy build system only geared towards producing binary
19     # wheels distributed via pypi.  For this, they copy the `uic` and `rcc`
20     # binaries to the wheel.
21     ./remove_hacky_binary_copying.patch
22   ];
24   postPatch = ''
25     cd sources/pyside2-tools
26   '';
28   nativeBuildInputs = [
29     cmake
30     wrapPython
31   ];
32   propagatedBuildInputs = [
33     shiboken2
34     pyside2
35   ];
36   buildInputs = [
37     python
38     qt5.qtbase
39   ];
41   cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
43   dontWrapQtApps = true;
45   # The upstream build system consists of a `setup.py` whichs builds three
46   # different python libraries and calls cmake as a subprocess.  We call cmake
47   # directly because that's easier to get working.  However, the `setup.py`
48   # build also creates a few wrapper scripts, which we replicate here:
49   postInstall = ''
50     rm $out/bin/pyside_tool.py
52     for tool in uic rcc; do
53       makeWrapper "$(command -v $tool)" $out/bin/pyside2-$tool --add-flags "-g python"
54     done
55   '';
57   postFixup = ''
58     wrapPythonPrograms
59   '';
61   meta = with lib; {
62     description = "PySide2 development tools";
63     license = licenses.gpl2;
64     homepage = "https://wiki.qt.io/Qt_for_Python";
65     maintainers = with maintainers; [ gebner ];
66   };