this dependency was unused: ``` $ nix why-depends .#python313Packages.wxpython .#SDL --precise --all these 5 paths will be fetched (4.96 MiB download, 21.60 MiB unpacked): /nix/store/vhz0cn55wadyknv3bz4in7drm0mmpny3-SDL_compat-1.2.68 /nix/store/jfia42fgcpz2gmb5l1mqps5qaaan3lcn-libadwaita-1.6.4 /nix/store/555981fqc4rkjdfapzsw092bqyrbi5s3-sdl2-compat-2.32.52 /nix/store/kq5gmdxv139qk1j50grxlqvrsrlx9aq5-sdl3-3.2.6-lib /nix/store/d9vlzcqg021zzyw6vwc7dfin8lbm86a1-zenity-4.0.5 'git+file:///home/grimmauld/nixpkgs#python313Packages.wxpython' does not depend on 'git+file:///home/grimmauld/nixpkgs#SDL' ``` ``` $ nix why-depends .#python313Packages.wxpython .#SDL --derivation --all /nix/store/79x3l16rh508qmbprz7xslqvd568gd8z-python3.13-wxpython-4.2.2.drv └───/nix/store/s0kxrg633g9j5yvqiw1d2dgw76hg5r53-SDL_compat-1.2.68.drv ```
140 lines
2.5 KiB
Nix
140 lines
2.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
setuptools,
|
|
fetchPypi,
|
|
replaceVars,
|
|
|
|
# build
|
|
autoPatchelfHook,
|
|
attrdict,
|
|
doxygen,
|
|
pkg-config,
|
|
python,
|
|
sip,
|
|
which,
|
|
buildPackages,
|
|
|
|
# runtime
|
|
cairo,
|
|
gst_all_1,
|
|
gtk3,
|
|
libGL,
|
|
libGLU,
|
|
libSM,
|
|
libXinerama,
|
|
libXtst,
|
|
libXxf86vm,
|
|
libglvnd,
|
|
libgbm,
|
|
pango,
|
|
webkitgtk_4_0,
|
|
wxGTK,
|
|
xorgproto,
|
|
|
|
# propagates
|
|
numpy,
|
|
pillow,
|
|
six,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "wxpython";
|
|
version = "4.2.2";
|
|
format = "other";
|
|
|
|
src = fetchPypi {
|
|
pname = "wxPython";
|
|
inherit version;
|
|
hash = "sha256-XbywZQ9n/cLFlleVolX/qj17CfsUmqjaLQ2apE444ro=";
|
|
};
|
|
|
|
patches = [
|
|
(replaceVars ./4.2-ctypes.patch {
|
|
libgdk = "${gtk3.out}/lib/libgdk-3.so";
|
|
libpangocairo = "${pango}/lib/libpangocairo-1.0.so";
|
|
libcairo = "${cairo}/lib/libcairo.so";
|
|
})
|
|
./0001-add-missing-bool-c.patch # Add missing bool.c from old source
|
|
];
|
|
|
|
# https://github.com/wxWidgets/Phoenix/issues/2575
|
|
postPatch = ''
|
|
ln -s ${lib.getExe buildPackages.waf} bin/waf
|
|
substituteInPlace build.py \
|
|
--replace-fail "distutils.dep_util" "setuptools.modified"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
attrdict
|
|
pkg-config
|
|
setuptools
|
|
sip
|
|
which
|
|
wxGTK
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
|
|
|
buildInputs =
|
|
[
|
|
wxGTK
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
gst_all_1.gst-plugins-base
|
|
gst_all_1.gstreamer
|
|
libGL
|
|
libGLU
|
|
libSM
|
|
libXinerama
|
|
libXtst
|
|
libXxf86vm
|
|
libglvnd
|
|
libgbm
|
|
webkitgtk_4_0
|
|
xorgproto
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
numpy
|
|
pillow
|
|
six
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
export DOXYGEN=${doxygen}/bin/doxygen
|
|
export PATH="${wxGTK}/bin:$PATH"
|
|
export WAF=$PWD/bin/waf
|
|
|
|
${python.pythonOnBuildForHost.interpreter} build.py -v --use_syswx dox etg sip --nodoc build_py
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py install --skip-build --prefix=$out
|
|
wrapPythonPrograms
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
${python.interpreter} build.py -v test
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/wxWidgets/Phoenix/blob/wxPython-${version}/CHANGES.rst";
|
|
description = "Cross platform GUI toolkit for Python, Phoenix version";
|
|
homepage = "http://wxpython.org/";
|
|
license = licenses.wxWindows;
|
|
maintainers = with maintainers; [ hexa ];
|
|
};
|
|
}
|