2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
buildPythonPackage,
|
|
|
|
pkg-config,
|
|
|
|
glib,
|
|
|
|
gobject-introspection,
|
|
|
|
pycairo,
|
|
|
|
cairo,
|
|
|
|
ncurses,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
pythonOlder,
|
|
|
|
gnome,
|
|
|
|
python,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygobject";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.48.2";
|
2020-11-12 09:05:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-02-05 17:12:51 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-B5SutKm+MaCSrCBiG19U7CgPkYWUPTKLEFza5imK0ac=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
depsBuildBuild = [ pkg-config ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
cairo
|
2022-08-12 12:06:08 +00:00
|
|
|
glib
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ncurses ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pycairo
|
2024-05-15 15:35:15 +00:00
|
|
|
gobject-introspection # e.g. try building: python3Packages.urwid python3Packages.pydbus
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
mesonFlags = [
|
|
|
|
# This is only used for figuring out what version of Python is in
|
|
|
|
# use, and related stuff like figuring out what the install prefix
|
|
|
|
# should be, but it does need to be able to execute Python code.
|
2023-11-16 04:20:00 +00:00
|
|
|
"-Dpython=${python.pythonOnBuildForHost.interpreter}"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
|
|
|
attrPath = "python3.pkgs.${pname}3";
|
2021-05-20 23:08:51 +00:00
|
|
|
versionPolicy = "odd-unstable";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pygobject.readthedocs.io/";
|
|
|
|
description = "Python bindings for Glib";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ jtojnar ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|