{ lib, stdenv, fetchFromGitHub, rustPlatform, libcosmicAppHook, pkg-config, just, glib, flatpak, openssl, nix-update-script, nixosTests, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-store"; version = "1.1.0"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-store"; tag = "epoch-${finalAttrs.version}"; hash = "sha256-pePtfOgeQtaD15dfWzrMQmXcINf/V5ovKWAG8kOPf+c="; }; cargoHash = "sha256-jECZ/6hxaDfz2pOOqLkbq5HfF3YnCVK2geFAC+n286A="; separateDebugInfo = true; __structuredAttrs = true; env.VERGEN_GIT_SHA = finalAttrs.src.tag; nativeBuildInputs = [ just pkg-config libcosmicAppHook ]; buildInputs = [ glib flatpak openssl ]; 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-store"; description = "App Store for the COSMIC Desktop Environment"; license = lib.licenses.gpl3Only; teams = [ lib.teams.cosmic ]; platforms = lib.platforms.linux; }; })