From 87fb1c480d3b1316ffa005e756875c930dfc1c36 Mon Sep 17 00:00:00 2001 From: ewuuwe Date: Fri, 8 Dec 2023 22:24:45 +0100 Subject: [PATCH] gnome-resources: init at 1.2.1 --- pkgs/tools/system/gnome-resources/default.nix | 77 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 79 insertions(+) create mode 100644 pkgs/tools/system/gnome-resources/default.nix diff --git a/pkgs/tools/system/gnome-resources/default.nix b/pkgs/tools/system/gnome-resources/default.nix new file mode 100644 index 000000000000..93c25e9b19d4 --- /dev/null +++ b/pkgs/tools/system/gnome-resources/default.nix @@ -0,0 +1,77 @@ +{ pkgs +, 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.0"; + + src = fetchFromGitHub { + owner = "nokyan"; + repo = "resources"; + rev = "v${version}"; + hash = "sha256-faZ6MDOu/y4+DX9ObjPyVkxKwmLffMJZ93Adf/t8nxQ="; + }; + + cargoDeps = rustPlatform.importCargoLock { + lockFile = "${src}/Cargo.lock"; + outputHashes = { + "plotters-cairo-0.4.0" = "sha256-m7ZT5F7WxjZSGQwuytqdMWUgYvcK2UCU/ntJGIJE+UA="; + }; + }; + + nativeBuildInputs = [ + pkg-config + desktop-file-utils + appstream-glib + meson + ninja + rustc + cargo + rustPlatform.cargoSetupHook + wrapGAppsHook4 + ]; + + buildInputs = [ + glib + gtk4 + libadwaita + polkit + systemd + ]; + + wrapperPath = lib.makeBinPath ([ + dmidecode + ]); + + postFixup = '' + # Ensure all dependencies are in PATH + wrapProgram $out/bin/resources \ + --prefix PATH : "${wrapperPath}" + ''; + + meta = with lib; { + homepage = "https://github.com/nokyan/resources"; + description = "Monitor your system resources and processes"; + license = licenses.gpl3; + mainProgram = "resources"; + maintainers = with maintainers; [ ewuuwe ]; + platforms = platforms.linux; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47e6879dd8aa..4b94dde92092 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8665,6 +8665,8 @@ 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 { };