Merge pull request #190057 from figsoda/update-iwgtk

iwgtk: 0.4.0 -> 0.8.0
This commit is contained in:
Jonas Heinrich 2022-09-07 08:01:20 +02:00 committed by GitHub
commit ac38775244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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]