Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

64 lines
1.4 KiB
Nix

{
lib,
fetchFromGitLab,
buildPythonApplication,
dbus-python,
pygobject3,
systemd,
wirelesstools,
wrapGAppsNoGuiHook,
}:
buildPythonApplication rec {
pname = "networkd-notify";
version = "unstable-2022-11-29";
# There is no setup.py, just a single Python script.
format = "other";
src = fetchFromGitLab {
owner = "wavexx";
repo = pname;
rev = "c2f3e71076a0f51c097064b1eb2505a361c7cc0e";
hash = "sha256-fanP1EWERT2Jy4OnMo8OMdR9flginYUgMw+XgmDve3o=";
};
nativeBuildInputs = [
wrapGAppsNoGuiHook
];
propagatedBuildInputs = [
dbus-python
pygobject3
];
patchPhase = ''
sed -i \
-e '/^NETWORKCTL = /c\NETWORKCTL = ["${systemd}/bin/networkctl"]' \
-e '/^IWCONFIG = /c\IWCONFIG = ["${wirelesstools}/bin/iwconfig"]' \
networkd-notify
'';
dontBuild = true;
installPhase = ''
install -D networkd-notify -t "$out/bin/"
install -D -m0644 networkd-notify.desktop -t "$out/share/applications/"
'';
# Let the Python wrapper add gappsWrapperArgs, to avoid two layers of wrapping.
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Desktop notification integration for systemd-networkd";
mainProgram = "networkd-notify";
homepage = "https://gitlab.com/wavexx/networkd-notify";
maintainers = with maintainers; [ danc86 ];
license = licenses.gpl3;
platforms = platforms.linux;
};
}