1 { lib, stdenv, fetchFromGitHub, rustPlatform, appstream, makeBinaryWrapper
2 , cosmic-icons, glib, just, pkg-config, libglvnd, libxkbcommon, libinput
3 , fontconfig, flatpak, freetype, openssl, wayland, xorg, vulkan-loader
4 , vulkan-validation-layers, }:
6 rustPlatform.buildRustPackage rec {
7 pname = "cosmic-store";
8 version = "1.0.0-alpha.2";
10 src = fetchFromGitHub {
12 repo = "cosmic-store";
13 rev = "epoch-${version}";
14 hash = "sha256-mq94ZMVOdXAPR52ID5x8nppJ9mNoTOPBfn7Eouj3T1U=";
15 fetchSubmodules = true;
19 lockFile = ./Cargo.lock;
21 "accesskit-0.12.2" = "sha256-1UwgRyUe0PQrZrpS7574oNLi13fg5HpgILtZGW6JNtQ=";
22 "appstream-0.2.2" = "sha256-OWeNXxvqU8s0ksdY9v5bZeNfDYgMBVd1DhEAjjZxEmo=";
23 "atomicwrites-0.4.2" = "sha256-QZSuGPrJXh+svMeFWqAXoqZQxLq/WfIiamqvjJNVhxA=";
24 "clipboard_macos-0.1.0" = "sha256-cG5vnkiyDlQnbEfV2sPbmBYKv1hd3pjJrymfZb8ziKk=";
25 "cosmic-config-0.1.0" = "sha256-gXrMEoAN+7nYAEcs4w6wROhQTjMCxkGn+muJutktLyk=";
26 "cosmic-text-0.12.1" = "sha256-u2Tw+XhpIKeFg8Wgru/sjGw6GUZ2m50ZDmRBJ1IM66w=";
27 "d3d12-0.19.0" = "sha256-usrxQXWLGJDjmIdw1LBXtBvX+CchZDvE8fHC0LjvhD4=";
28 "glyphon-0.5.0" = "sha256-j1HrbEpUBqazWqNfJhpyjWuxYAxkvbXzRKeSouUoPWg=";
29 "smithay-clipboard-0.8.0" = "sha256-4InFXm0ahrqFrtNLeqIuE3yeOpxKZJZx+Bc0yQDtv34=";
30 "softbuffer-0.4.1" = "sha256-a0bUFz6O8CWRweNt/OxTvflnPYwO5nm6vsyc/WcXyNg=";
31 "taffy-0.3.11" = "sha256-SCx9GEIJjWdoNVyq+RZAGn0N71qraKZxf9ZWhvyzLaI=";
32 "winit-0.29.10" = "sha256-ScTII2AzK3SC8MVeASZ9jhVWsEaGrSQ2BnApTxgfxK4=";
37 substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
40 nativeBuildInputs = [ just pkg-config makeBinaryWrapper ];
54 vulkan-validation-layers
57 dontUseJustBuild = true;
65 "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-store"
68 # Force linking to libEGL, which is always dlopen()ed, and to
69 # libwayland-client, which is always dlopen()ed except by the
70 # obscure winit backend.
71 RUSTFLAGS = map (a: "-C link-arg=${a}") [
72 "-Wl,--push-state,--no-as-needed"
78 # LD_LIBRARY_PATH can be removed once tiny-xlib is bumped above 0.2.2
80 wrapProgram "$out/bin/cosmic-store" \
81 --suffix XDG_DATA_DIRS : "${cosmic-icons}/share" \
82 --prefix LD_LIBRARY_PATH : ${
95 homepage = "https://github.com/pop-os/cosmic-store";
96 description = "App Store for the COSMIC Desktop Environment";
97 license = licenses.gpl3Only;
98 maintainers = with maintainers; [ ahoneybun nyabinary ];
99 platforms = platforms.linux;