{ lib, fetchFromGitHub, stdenv, rustPlatform, libcosmicAppHook, just, nix-update-script, nixosTests, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-app-library"; version = "1.1.0"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-app-library"; tag = "epoch-${finalAttrs.version}"; hash = "sha256-TZncRQer4lXunUwdQ2xDP3DmF5B7UmfhSQvEwVodc98="; }; cargoHash = "sha256-qGx/3w78mgIMqRo1wJA+ULFHWdNW2LKe2Sej4f9KbVs="; separateDebugInfo = true; __structuredAttrs = true; nativeBuildInputs = [ just libcosmicAppHook ]; 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-app-library"; description = "Application Template for the COSMIC Desktop Environment"; license = lib.licenses.gpl3Only; teams = [ lib.teams.cosmic ]; platforms = lib.platforms.linux; mainProgram = "cosmic-app-library"; }; })