diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyside2-tools/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyside2-tools/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyside2-tools/default.nix b/nixpkgs/pkgs/development/python-modules/pyside2-tools/default.nix index a96ea5d32ff..9f1f94ffecb 100644 --- a/nixpkgs/pkgs/development/python-modules/pyside2-tools/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pyside2-tools/default.nix @@ -6,6 +6,13 @@ stdenv.mkDerivation { inherit (pyside2) version src; + patches = [ + # Upstream has a crazy build system only geared towards producing binary + # wheels distributed via pypi. For this, they copy the `uic` and `rcc` + # binaries to the wheel. + ./remove_hacky_binary_copying.patch + ]; + postPatch = '' cd sources/pyside2-tools ''; @@ -18,8 +25,16 @@ stdenv.mkDerivation { "-DBUILD_TESTS=OFF" ]; + # The upstream build system consists of a `setup.py` whichs builds three + # different python libraries and calls cmake as a subprocess. We call cmake + # directly because that's easier to get working. However, the `setup.py` + # build also creates a few wrapper scripts, which we replicate here: postInstall = '' rm $out/bin/pyside_tool.py + + for tool in uic rcc; do + makeWrapper "$(command -v $tool)" $out/bin/pyside2-$tool --add-flags "-g python" + done ''; postFixup = '' |