geteduroam: init at 0.10 (#408187)

authored by Aleksana and committed by GitHub b36d90cf 5c68d925

+92
+92
pkgs/by-name/ge/geteduroam/package.nix
···
··· 1 + { 2 + lib, 3 + buildGoModule, 4 + fetchFromGitHub, 5 + symlinkJoin, 6 + versionCheckHook, 7 + makeWrapper, 8 + wrapGAppsHook4, 9 + cairo, 10 + gdk-pixbuf, 11 + glib, 12 + graphene, 13 + gtk4, 14 + libadwaita, 15 + pango, 16 + }: 17 + 18 + buildGoModule (finalAttrs: { 19 + pname = "geteduroam"; 20 + version = "0.10"; 21 + 22 + src = fetchFromGitHub { 23 + owner = "geteduroam"; 24 + repo = "linux-app"; 25 + tag = finalAttrs.version; 26 + hash = "sha256-Mtzt6i8vJ5M8T0vrAOxXhawlhCmCMEnDQz0Jo6uV88A="; 27 + }; 28 + 29 + vendorHash = "sha256-b06wnqT88J7etNTFJ6nE9Uo0gOQOGvvs0vPNnJr6r4Q="; 30 + 31 + subPackages = [ 32 + "cmd/geteduroam-gui" 33 + "cmd/geteduroam-notifcheck" 34 + ]; 35 + 36 + postInstall = '' 37 + wrapProgram $out/bin/geteduroam-gui \ 38 + --set-default PUREGOTK_LIB_FOLDER ${finalAttrs.passthru.libraryPath}/lib \ 39 + ''${gappsWrapperArgs[@]} 40 + 41 + # copy notifcheck service 42 + mkdir -p $out/lib/systemd/system/ 43 + cp -v systemd/user/geteduroam/* $out/lib/systemd/system/ 44 + substituteInPlace $out/lib/systemd/system/geteduroam-notifs.service \ 45 + --replace-fail \ 46 + "ExecStart=/usr/bin/geteduroam-notifcheck" \ 47 + "ExecStart=$out/bin/geteduroam-notifcheck" 48 + 49 + # copy icons and desktop entries 50 + cp -r cmd/geteduroam-gui/resources/share $out/ 51 + ''; 52 + 53 + nativeBuildInputs = [ 54 + wrapGAppsHook4 55 + makeWrapper 56 + ]; 57 + 58 + dontWrapGApps = true; 59 + 60 + nativeInstallCheckInputs = [ 61 + versionCheckHook 62 + ]; 63 + versionCheckProgram = "${placeholder "out"}/bin/geteduroam-gui"; 64 + versionCheckProgramArg = "--version"; 65 + doInstallCheck = true; 66 + 67 + passthru = { 68 + libraryPath = symlinkJoin { 69 + name = "eduroam-gui-puregotk-lib"; 70 + # based on https://github.com/jwijenbergh/puregotk/blob/bc1a52f44fd4c491947f7af85296c66173da17ba/internal/core/core.go#L41 71 + paths = [ 72 + cairo 73 + gdk-pixbuf 74 + glib.out 75 + graphene 76 + gtk4 77 + libadwaita 78 + pango.out 79 + ]; 80 + }; 81 + }; 82 + 83 + meta = { 84 + description = "GUI client to configure eduroam"; 85 + homepage = "https://eduroam.app"; 86 + license = lib.licenses.bsd3; 87 + maintainers = with lib.maintainers; [ pbsds ]; 88 + platforms = lib.platforms.linux; 89 + changelog = "https://github.com/geteduroam/linux-app/releases/tag/${finalAttrs.version}"; 90 + mainProgram = "geteduroam-gui"; 91 + }; 92 + })