Merge pull request #273374 from amaxine/merge-resources

{gnome-,}resources: merge, fix up
This commit is contained in:
maxine 2024-01-05 15:32:56 +00:00 committed by GitHub
commit bbc6e36b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 77 deletions

View File

@ -13,23 +13,25 @@
, glib
, gtk4
, libadwaita
, dmidecode
, util-linux
}:
stdenv.mkDerivation (finalAttrs: {
pname = "resources";
version = "1.2.1";
version = "1.3.0";
src = fetchFromGitHub {
owner = "nokyan";
repo = "resources";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-OVz1vsmOtH/5sEuyl2BfDqG2/9D1HGtHA0FtPntKQT0=";
hash = "sha256-57GsxLxnaQ9o3Dux2fTNWUmhOMs6waYvtV6260CM5fo=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) src;
name = "resources-${finalAttrs.version}";
hash = "sha256-MNYKfvbLQPWm7MKS5zYGrc+aoC9WeU5FTftkCrogZg0=";
hash = "sha256-bHzijXjvbmYltNHevhddz5TCYKg2OMRn+Icb77F18XU=";
};
nativeBuildInputs = [
@ -50,6 +52,15 @@ stdenv.mkDerivation (finalAttrs: {
libadwaita
];
postPatch = ''
substituteInPlace src/utils/memory.rs \
--replace '"dmidecode"' '"${dmidecode}/bin/dmidecode"'
substituteInPlace src/utils/cpu.rs \
--replace '"lscpu"' '"${util-linux}/bin/lscpu"'
substituteInPlace src/utils/memory.rs \
--replace '"pkexec"' '"/run/wrappers/bin/pkexec"'
'';
mesonFlags = [
(lib.mesonOption "profile" "default")
];
@ -60,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: {
homepage = "https://github.com/nokyan/resources";
license = lib.licenses.gpl3Only;
mainProgram = "resources";
maintainers = with lib.maintainers; [ lukas-heiligenbrunner ];
maintainers = with lib.maintainers; [ lukas-heiligenbrunner ewuuwe ];
platforms = lib.platforms.linux;
};
})

View File

@ -1,71 +0,0 @@
{ fetchFromGitHub
, stdenv
, lib
, appstream-glib
, cargo
, desktop-file-utils
, meson
, pkg-config
, rustPlatform
, rustc
, glib
, wrapGAppsHook4
, systemd
, polkit
, dmidecode
, gtk4
, libadwaita
, ninja
}:
stdenv.mkDerivation rec {
pname = "gnome-resources";
version = "1.2.1";
src = fetchFromGitHub {
owner = "nokyan";
repo = "resources";
rev = "v${version}";
hash = "sha256-OVz1vsmOtH/5sEuyl2BfDqG2/9D1HGtHA0FtPntKQT0=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
hash = "sha256-SkCEA9CKqzy0wSIUj0DG6asIysD7G9i3nJ9jwhwAUqY=";
};
nativeBuildInputs = [
pkg-config
desktop-file-utils
appstream-glib
meson
ninja
rustc
cargo
rustPlatform.cargoSetupHook
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
libadwaita
polkit
systemd
];
postPatch = ''
substituteInPlace src/utils/memory.rs \
--replace '"dmidecode"' '"${dmidecode}/bin/dmidecode"'
'';
mesonFlags = [ "-Dprofile=default" ];
meta = with lib; {
homepage = "https://github.com/nokyan/resources";
description = "Monitor your system resources and processes";
license = licenses.gpl3Plus;
mainProgram = "resources";
maintainers = with maintainers; [ ewuuwe ];
platforms = platforms.linux;
};
}

View File

@ -325,6 +325,7 @@ mapAliases ({
gnome-firmware-updater = gnome-firmware; # added 2022-04-14
gnome-passwordsafe = gnome-secrets; # added 2022-01-30
gnome-mpv = throw "'gnome-mpv' has been renamed to/replaced by 'celluloid'"; # Converted to throw 2023-09-10
gnome-resources = resources; # added 2023-12-10
gnome_user_docs = throw "'gnome_user_docs' has been renamed to/replaced by 'gnome-user-docs'"; # Converted to throw 2023-09-10
gnuradio-with-packages = gnuradio3_7.override {

View File

@ -8661,8 +8661,6 @@ with pkgs;
gnome-randr = callPackage ../tools/wayland/gnome-randr { };
gnome-resources = callPackage ../tools/system/gnome-resources { };
gnuapl = callPackage ../development/interpreters/gnu-apl { };
gnu-shepherd = callPackage ../misc/gnu-shepherd { };