Install this version:
emerge -a =net-misc/nmgui-1.0.0-r1
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =net-misc/nmgui-1.0.0-r1
Or alternatively:
emerge --autounmask-write -a =net-misc/nmgui-1.0.0-r1
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1
DESCRIPTION="A simple, lightweight GTK4-based GUI for NetworkManager using nmcli"
HOMEPAGE="https://github.com/s-adi-dev/nmgui"
SRC_URI="https://github.com/s-adi-dev/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="
>=dev-lang/python-3.10
dev-python/pygobject[${PYTHON_USEDEP}]
gui-libs/gtk:4
net-misc/networkmanager
"
RDEPEND="${DEPEND}
dev-python/python-nmcli[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
"
src_prepare() {
default
# Create a proper setup.py that includes the app directory
cat > setup.py << EOF
from setuptools import setup, find_packages
setup(
name="nmgui",
version="${PV}",
packages=["app", "app.ui"],
package_data={
"app": ["*.py"],
"app.ui": ["*.py", "*.ui", "*.glade", "*.xml"],
},
entry_points={
"console_scripts": [
"nmgui=app.main:main",
],
},
install_requires=[
"pygobject",
"nmcli",
],
)
EOF
# Create __init__.py files if they don't exist
touch app/__init__.py
touch app/ui/__init__.py
}
src_install() {
distutils-r1_src_install
# Install desktop file if it exists
if [[ -f "${S}/nmgui.desktop" ]]; then
domenu "${S}/nmgui.desktop"
fi
}
pkg_postinst() {
elog "nmgui requires NetworkManager to be running to function properly."
elog "Make sure you have NetworkManager enabled:"
elog " rc-update add NetworkManager default"
elog " systemctl enable NetworkManager"
}
>=dev-lang/python-3.10 dev-python/pygobject[] gui-libs/gtk:4 net-misc/networkmanager
>=dev-lang/python-3.10 dev-python/pygobject[] gui-libs/gtk:4 net-misc/networkmanager dev-python/python-nmcli[]
dev-python/setuptools[]