blob: 77493ba4305619b988bbaf4e08e0aae0e6bf37ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
{
lib,
buildPythonPackage,
cmake-build-extension,
fetchFromGitHub,
pythonRelaxDepsHook,
pyside6,
qt6,
setuptools,
setuptools-scm,
shiboken6,
}:
buildPythonPackage rec {
pname = "pyside6-qtads";
version = "4.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mborgerson";
repo = "pyside6_qtads";
tag = "v${version}";
hash = "sha256-XEPhZBFAZOvr3Kelz9mplkJiQH3zUf2QZJs/NNJE114=";
fetchSubmodules = true;
};
# bypass the broken parts of their bespoke python script cmake plugin
patches = [ ./find-nix-deps.patch ];
postPatch = ''
substituteInPlace setup.py \
--replace-fail @shiboken6@ ${shiboken6} \
--replace-fail @pyside6@ ${pyside6}
# can't use pythonRelaxDepsHook because it runs postBuild but the dependency check
# happens during build.
# -Essentials is a smaller version of PySide6, but the name mismatch breaks build
# _generator is also a virtual package with the same issue
substituteInPlace pyproject.toml \
--replace-warn 'PySide6-Essentials' "" \
--replace-warn 'shiboken6_generator' "" \
--replace-quiet '"",' "" \
--replace-quiet '""' ""
'';
buildInputs = [
qt6.qtbase
qt6.qtquick3d
];
build-system = [
cmake-build-extension
setuptools
setuptools-scm
];
dependencies = [
pyside6
shiboken6
];
nativeBuildInputs = [ pythonRelaxDepsHook ];
# cmake-build-extension will configure
dontUseCmakeConfigure = true;
dontWrapQtApps = true;
# runtime deps check fails on the pyside6-essentials virtual package
dontCheckRuntimeDeps = true;
pythonImportsCheck = [ "PySide6QtAds" ];
meta = {
description = "Python bindings to Qt Advanced Docking System for PySide6";
homepage = "https://github.com/mborgerson/pyside6_qtads";
changelog = "https://github.com/mborgerson/pyside6_qtads/releases/tag/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ scoder12 ];
};
}
|