1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 versionCheckHook,
6 nix-update-script,
7 cosmic-comp,
8}:
9rustPlatform.buildRustPackage (finalAttrs: {
10 pname = "cosmic-ext-ctl";
11 version = "1.5.0";
12
13 src = fetchFromGitHub {
14 owner = "cosmic-utils";
15 repo = "cosmic-ctl";
16 tag = "v${finalAttrs.version}";
17 hash = "sha256-URqNhkC1XrXYxr14K6sT3TLso38eWLMA+WplBdj52Vg=";
18 };
19
20 cargoHash = "sha256-OL1LqOAyIFFCGIp3ySdvEXJ1ECp9DgC/8mfAPo/E7k4=";
21
22 doInstallCheck = true;
23 nativeInstallCheckInputs = [ versionCheckHook ];
24 versionCheckProgram = "${placeholder "out"}/bin/cosmic-ctl";
25
26 passthru.updateScript = nix-update-script { };
27
28 meta = {
29 description = "CLI for COSMIC Desktop configuration management";
30 changelog = "https://github.com/cosmic-utils/cosmic-ctl/releases/tag/v${finalAttrs.version}";
31 homepage = "https://github.com/cosmic-utils/cosmic-ctl";
32 license = lib.licenses.gpl3Only;
33 maintainers = with lib.maintainers; [ HeitorAugustoLN ];
34 mainProgram = "cosmic-ctl";
35 inherit (cosmic-comp.meta) platforms;
36 };
37})