{ lib, stdenv, fetchFromGitHub, rustPlatform, libcosmicAppHook, pkg-config, just, glib, flatpak, openssl, nix-update-script, nixosTests, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-store"; version = "1.0.0-alpha.7"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-store"; tag = "epoch-${finalAttrs.version}"; hash = "sha256-skNzkpcdGJkve7enlnnZxYxnScHFmyaCAy0xaMEEsE0="; }; cargoHash = "sha256-2iWJFPSvNQ6JwQwzowKYbgjog2gsjOUlReai/j0d3Do="; nativeBuildInputs = [ just pkg-config libcosmicAppHook ]; buildInputs = [ glib flatpak openssl ]; dontUseJustBuild = true; dontUseJustCheck = true; justFlags = [ "--set" "prefix" (placeholder "out") "--set" "bin-src" "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-store" ]; passthru = { tests = { inherit (nixosTests) cosmic cosmic-autologin cosmic-noxwayland cosmic-autologin-noxwayland ; }; updateScript = nix-update-script { extraArgs = [ "--version" "unstable" "--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; }; })