From a0bc650cfb757b72f87324176b600640ae886678 Mon Sep 17 00:00:00 2001 From: Salva Date: Tue, 23 Jun 2026 20:24:17 -0600 Subject: [PATCH] cosmic-monitor: init at 1.1.0 --- pkgs/by-name/co/cosmic-monitor/package.nix | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 pkgs/by-name/co/cosmic-monitor/package.nix diff --git a/pkgs/by-name/co/cosmic-monitor/package.nix b/pkgs/by-name/co/cosmic-monitor/package.nix new file mode 100644 index 000000000000..9b1bdd228583 --- /dev/null +++ b/pkgs/by-name/co/cosmic-monitor/package.nix @@ -0,0 +1,73 @@ +{ + lib, + stdenv, + rustPlatform, + fetchFromGitHub, + just, + libcosmicAppHook, + nixosTests, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "cosmic-monitor"; + version = "1.1.0"; + + # nixpkgs-update: no auto update + src = fetchFromGitHub { + owner = "pop-os"; + repo = "cosmic-monitor"; + tag = "epoch-${finalAttrs.version}"; + hash = "sha256-CiJ9LeNcdOyC8yn0c7hCz0QEecxYK95KGvs1SWr9360="; + }; + + cargoHash = "sha256-OMhLPQ3GkV/wdeb9F7lsKY1Uzzg8+UlhOeakGZo6mYk="; + + separateDebugInfo = true; + __structuredAttrs = true; + + nativeBuildInputs = [ + just + libcosmicAppHook + rustPlatform.bindgenHook + ]; + + dontUseJustBuild = true; + dontUseJustCheck = true; + + justFlags = [ + "--set" + "prefix" + (placeholder "out") + "--set" + "cargo-target-dir" + "target/${stdenv.hostPlatform.rust.cargoShortTarget}" + ]; + + passthru = { + tests = { + inherit (nixosTests) + cosmic + cosmic-autologin + cosmic-noxwayland + cosmic-autologin-noxwayland + ; + }; + + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "epoch-(.*)" + ]; + }; + }; + + meta = { + homepage = "https://github.com/pop-os/cosmic-monitor"; + description = "COSMIC System Monitor"; + mainProgram = "cosmic-monitor"; + license = lib.licenses.gpl3Only; + teams = [ lib.teams.cosmic ]; + platforms = lib.platforms.linux; + }; +})