hardinfo2: 2.2.10 -> 2.2.13

* Provide newly required wayland dependencies
* Move to finalAttrs pattern
* Remove update menu item
* Default to no-theme
* Fix access to xdg-open
* Provide runtime tooling for various benchmarks
* Make cups available for printer support
* Fix path on service file
* Added passthru.updateScript accounting for release- to get auto-updates
* Added meta.downloadPage
* Added meta.changelog
* Add myself as a maintainer

authored by 06kellyjac and committed by Bjørn Forsman ee52555c c3036a81

+153 -17
+13
pkgs/by-name/ha/hardinfo2/default-no-theme.patch
··· 1 + diff --git a/shell/shell.c b/shell/shell.c 2 + index 76523e9a..dbfe2d16 100644 3 + --- a/shell/shell.c 4 + +++ b/shell/shell.c 5 + @@ -620,7 +620,7 @@ static void create_window(void) 6 + gchar *conf_path = g_build_filename(g_get_user_config_dir(), "hardinfo2","settings.ini", NULL); 7 + g_key_file_load_from_file(key_file, conf_path, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, NULL); 8 + params.theme = g_key_file_get_integer(key_file, "Theme", "ThemeNumber", NULL); 9 + - if(params.theme==0) params.theme=1; 10 + + if(params.theme==0) params.theme=-1; //default to no theme 11 + if(params.theme<-1) params.theme=-1; 12 + if(params.theme>6) params.theme=-1; 13 +
+82 -17
pkgs/by-name/ha/hardinfo2/package.nix
··· 4 4 fetchFromGitHub, 5 5 6 6 cmake, 7 + glslang, 7 8 pkg-config, 8 9 libsForQt5, 10 + makeWrapper, 9 11 wrapGAppsHook4, 10 12 13 + cups, 11 14 gtk3, 12 15 json-glib, 13 16 lerc, 14 17 libdatrie, 18 + libdecor, 15 19 libepoxy, 16 20 libnghttp2, 17 21 libpsl, ··· 21 25 libsysprof-capture, 22 26 libthai, 23 27 libxkbcommon, 28 + libXdmcp, 29 + libXtst, 24 30 pcre2, 25 31 sqlite, 26 32 util-linux, 27 - libXdmcp, 28 - libXtst, 33 + vulkan-headers, 34 + wayland, 35 + 36 + # runtime 37 + dmidecode, 38 + gawk, 39 + iperf, 29 40 mesa-demos, 30 - makeWrapper, 31 - dmidecode, 41 + sysbench, 42 + udisks, 43 + vulkan-tools, 44 + xdg-utils, 45 + xrandr, 46 + 47 + nix-update-script, 48 + 49 + printingSupport ? true, 32 50 }: 33 51 34 - stdenv.mkDerivation (finalAtrs: { 52 + stdenv.mkDerivation (finalAttrs: { 35 53 pname = "hardinfo2"; 36 - version = "2.2.10"; 54 + version = "2.2.13"; 37 55 38 56 src = fetchFromGitHub { 39 57 owner = "hardinfo2"; 40 58 repo = "hardinfo2"; 41 - tag = "release-${finalAtrs.version}"; 42 - hash = "sha256-Ea1uhzAQEn8oDvWslGzrqoI2yzVDGxwTqbthfKEkYyQ="; 59 + tag = "release-${finalAttrs.version}"; 60 + hash = "sha256-HRP8xjiwhlNHjW4D8y74Pshpn7bksmN5j4jhfF6KOYo="; 43 61 }; 44 62 63 + patches = [ 64 + ./remove-update.patch 65 + ./default-no-theme.patch 66 + ]; 67 + 68 + # fix absolute path for xdg-open 69 + postPatch = '' 70 + substituteInPlace deps/sysobj_early/gui/uri_handler.c \ 71 + --replace-fail /usr/bin/xdg-open "${lib.getExe' xdg-utils "xdg-open"}" 72 + ''; 73 + 45 74 nativeBuildInputs = [ 46 75 cmake 47 76 pkg-config 77 + 78 + glslang 79 + 48 80 wrapGAppsHook4 49 81 libsForQt5.wrapQtAppsHook 50 82 makeWrapper 51 83 ]; 52 84 53 - preFixup = '' 54 - makeWrapperArgs+=("''${qtWrapperArgs[@]}") 55 - ''; 56 - 57 - dontWrapQtApps = true; 58 - 59 85 buildInputs = [ 60 86 gtk3 61 87 json-glib 62 88 lerc 63 89 libdatrie 90 + libdecor 64 91 libepoxy 65 92 libnghttp2 66 93 libpsl ··· 75 102 util-linux 76 103 libXdmcp 77 104 libXtst 105 + vulkan-headers 106 + wayland 78 107 ]; 79 108 80 109 hardeningDisable = [ "fortify" ]; ··· 84 113 (lib.cmakeFeature "CMAKE_INSTALL_SERVICEDIR" "${placeholder "out"}/lib") 85 114 ]; 86 115 116 + dontWrapQtApps = true; 117 + preFixup = '' 118 + makeWrapperArgs+=("''${qtWrapperArgs[@]}") 119 + ''; 120 + 121 + runtimeDeps = [ 122 + # system stats 123 + dmidecode 124 + mesa-demos # glxinfo + vkgears for benchmark 125 + 126 + # display info 127 + vulkan-tools # vulkaninfo 128 + xrandr 129 + 130 + # additional tooling for benchmarks 131 + # https://github.com/hardinfo2/hardinfo2/blob/release-2.2.13/shell/shell.c#L641-L652 132 + gawk 133 + iperf 134 + sysbench 135 + udisks 136 + ]; 137 + 138 + runtimeLibs = lib.optionals printingSupport [ cups ]; 139 + 87 140 postFixup = '' 88 141 wrapProgram $out/bin/hardinfo2 \ 89 - --prefix PATH : "${dmidecode}/bin:${mesa-demos}/bin" 142 + --prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps} \ 143 + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.runtimeLibs} 144 + 145 + substituteInPlace $out/lib/systemd/system/hardinfo2.service \ 146 + --replace-fail "ExecStart=/usr/bin/hwinfo2_fetch_sysdata" "ExecStart=$out/hwinfo2_fetch_sysdata" 90 147 ''; 91 148 149 + # account for tags having a release- prefix 150 + passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=release-(.*)" ]; }; 151 + 92 152 meta = { 93 - homepage = "http://www.hardinfo2.org"; 94 153 description = "System information and benchmarks for Linux systems"; 154 + homepage = "http://www.hardinfo2.org/"; 155 + downloadPage = "https://github.com/hardinfo2/hardinfo2/"; 156 + changelog = "https://github.com/hardinfo2/hardinfo2/releases/tag/release-${finalAttrs.version}"; 95 157 license = with lib.licenses; [ 96 158 gpl2Plus 97 159 gpl3Plus 98 160 lgpl2Plus 99 161 ]; 100 - maintainers = with lib.maintainers; [ sigmanificient ]; 162 + maintainers = with lib.maintainers; [ 163 + sigmanificient 164 + jk 165 + ]; 101 166 platforms = lib.platforms.linux; 102 167 mainProgram = "hardinfo2"; 103 168 };
+58
pkgs/by-name/ha/hardinfo2/remove-update.patch
··· 1 + diff --git a/includes/uidefs.h b/includes/uidefs.h 2 + index 552fd3cb..4998f677 100644 3 + --- a/includes/uidefs.h 4 + +++ b/includes/uidefs.h 5 + @@ -36,7 +36,6 @@ char *uidefs_str = 6 + " <menu name=\"HelpMenu\" action=\"HelpMenuAction\">" 7 + " <menuitem name=\"WebPage\" action=\"HomePageAction\" always-show-image=\"true\"/>" 8 + " <menuitem name=\"HelpPage\" action=\"HelpPageAction\" always-show-image=\"true\"/>" 9 + - " <menuitem name=\"UpdatesPage\" action=\"UpdatesPageAction\" always-show-image=\"true\"/>" 10 + " <menuitem name=\"ReportBug\" action=\"ReportBugAction\" always-show-image=\"true\"/>" 11 + " <menuitem name=\"About\" action=\"AboutAction\" always-show-image=\"true\"/>" 12 + " </menu>" 13 + @@ -48,8 +47,6 @@ char *uidefs_str = 14 + /* " <toolitem name=\"Copy\" action=\"CopyAction\"/>"*/ 15 + " <separator/>" 16 + " <toolitem name=\"SyncManager\" action=\"SyncManagerAction\" always-show-image=\"true\"/>" 17 + - " <separator/>" 18 + - " <toolitem name=\"Update\" action=\"UpdateAction\" always-show-image=\"true\"/>" 19 + " </toolbar>" 20 + "</ui>"; 21 + 22 + diff --git a/shell/menu.c b/shell/menu.c 23 + index 5ffd4410..04398b1d 100644 24 + --- a/shell/menu.c 25 + +++ b/shell/menu.c 26 + @@ -52,11 +52,6 @@ static GtkActionEntry entries[] = { 27 + N_("Send benchmark results and receive updated data from the network"), 28 + G_CALLBACK(cb_sync_manager)}, 29 + 30 + - {"UpdateAction", HI_STOCK_UPDATES, 31 + - N_("Update Available"), "", 32 + - N_("Update Available"), 33 + - G_CALLBACK(cb_update)}, 34 + - 35 + //does not work correctly and value low 36 + /*{"CopyAction", HI_STOCK_CLIPBOARD, 37 + N_("_Copy to Clipboard"), "<control>C", 38 + @@ -78,11 +73,6 @@ static GtkActionEntry entries[] = { 39 + NULL, 40 + G_CALLBACK(cb_open_help_page)}, 41 + 42 + - {"UpdatesPageAction", NULL, 43 + - N_("_Update HardInfo2"), "", 44 + - NULL, 45 + - G_CALLBACK(cb_open_updates_page)}, 46 + - 47 + {"ReportBugAction", NULL, 48 + N_("_Report bug"), NULL, 49 + NULL, 50 + @@ -237,8 +227,6 @@ void menu_init(Shell * shell) 51 + gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("home.svg",size,size)); 52 + t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/HelpPage")); 53 + gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("help.svg",size,size)); 54 + - t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/UpdatesPage")); 55 + - gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("updates.svg",size,size)); 56 + t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/ReportBug")); 57 + gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("report-bug.svg",size,size)); 58 + t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/About"));