3
0
Fork 0
forked from mirrors/nixpkgs

iwgtk: 0.4.0 -> 0.8.0

This commit is contained in:
figsoda 2022-09-06 14:30:05 -04:00
parent 584c71c320
commit bb6a40ebb6
2 changed files with 35 additions and 6 deletions

View file

@ -1,21 +1,38 @@
{ fetchFromGitHub, gtk3, lib, pkg-config, stdenv }:
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, scdoc
, wrapGAppsHook
, gtk4
, qrencode
}:
stdenv.mkDerivation rec {
pname = "iwgtk";
version = "0.4";
version = "0.8";
src = fetchFromGitHub {
owner = "j-lentz";
repo = pname;
rev = "v${version}";
sha256 = "129h7vq9b1r9a5c79hk8d06bj8lgzrnhq55x54hqri9c471jjh0s";
sha256 = "sha256-89rzDxalZtQkwAKS6hKPVY87kOWPySwDeZrPs2rGs/k=";
};
nativeBuildInputs = [ pkg-config ];
# patch systemd service to pass necessary environments and use absolute paths
patches = [ ./systemd-service.patch ];
buildInputs = [ gtk3 ];
nativeBuildInputs = [ meson ninja pkg-config scdoc wrapGAppsHook ];
makeFlags = [ "prefix=$(out)" ];
buildInputs = [ gtk4 qrencode ];
postInstall = ''
mv $out/share/lib/systemd $out/share
rmdir $out/share/lib
substituteInPlace $out/share/systemd/user/iwgtk.service --subst-var out
'';
meta = with lib; {
description = "Lightweight, graphical wifi management utility for Linux";

View file

@ -0,0 +1,12 @@
--- a/misc/iwgtk.service
+++ b/misc/iwgtk.service
@@ -6,7 +6,8 @@ PartOf=graphical-session.target
After=graphical-session.target
[Service]
-ExecStart=iwgtk -i
+ExecStart=@out@/bin/iwgtk -i
+PassEnvironment=DISPLAY XAUTHORITY
Restart=on-failure
[Install]