
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
pytestCheckHook,
|
|
pyqt5,
|
|
pyqt3d,
|
|
pyqtchart,
|
|
pyqtdatavisualization,
|
|
pyqtwebengine,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyqt5-stubs";
|
|
version = "5.15.6.0";
|
|
format = "setuptools";
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "python-qt-tools";
|
|
repo = "PyQt5-stubs";
|
|
rev = version;
|
|
hash = "sha256-qWnvlHnFRy8wbZJ28C0pYqAxod623Epe5z5FZufheDc=";
|
|
};
|
|
postPatch =
|
|
''
|
|
# pulls in a dependency to mypy, but we don't want to run linters
|
|
rm tests/test_stubs.py
|
|
''
|
|
+ lib.optionalString (!pyqt5.connectivityEnabled) ''
|
|
rm tests/qflags/test_QtBluetooth_*
|
|
rm tests/qflags/test_QtNfc_*
|
|
''
|
|
+ lib.optionalString (!pyqt5.locationEnabled) ''
|
|
rm tests/qflags/test_QtLocation_*
|
|
rm tests/qflags/test_QtPositioning_*
|
|
''
|
|
+ lib.optionalString (!pyqt5.multimediaEnabled) ''
|
|
rm tests/qflags/test_QtMultimedia_*
|
|
''
|
|
+ lib.optionalString (!pyqt5.serialPortEnabled) ''
|
|
rm tests/qflags/test_QtSerialPort_*
|
|
''
|
|
+ lib.optionalString (!pyqt5.toolsEnabled) ''
|
|
rm tests/qflags/test_QtDesigner_*
|
|
'';
|
|
|
|
pythonImportsCheck = [ "PyQt5-stubs" ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pyqt5
|
|
pyqt3d
|
|
pyqtchart
|
|
pyqtdatavisualization
|
|
pyqtwebengine
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Stubs for PyQt5";
|
|
homepage = "https://github.com/python-qt-tools/PyQt5-stubs";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ _999eagle ];
|
|
};
|
|
}
|