{ lib , stdenv , fetchFromGitHub , rustPlatform , just , pkg-config , makeBinaryWrapper , libxkbcommon , wayland , appstream-glib , desktop-file-utils , intltool }: rustPlatform.buildRustPackage rec { pname = "cosmic-launcher"; version = "1.0.0-alpha.1"; src = fetchFromGitHub { owner = "pop-os"; repo = pname; rev = "epoch-${version}"; hash = "sha256-LzTVtXyNgaVKyARmrmb6YUi4dWa20EwM1SYMlnawtzk="; }; useFetchCargoVendor = true; cargoHash = "sha256-bHJUsXHnPH6aV2vTQv1Cdx+p4/Pplg6HMguw5BK9qJ8="; nativeBuildInputs = [ just pkg-config makeBinaryWrapper ]; buildInputs = [ libxkbcommon wayland appstream-glib desktop-file-utils intltool ]; dontUseJustBuild = true; justFlags = [ "--set" "prefix" (placeholder "out") "--set" "bin-src" "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-launcher" ]; postPatch = '' substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)" ''; postInstall = '' wrapProgram $out/bin/cosmic-launcher \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [wayland]}" ''; RUSTFLAGS = "--cfg tokio_unstable"; meta = with lib; { homepage = "https://github.com/pop-os/cosmic-launcher"; description = "Launcher for the COSMIC Desktop Environment"; mainProgram = "cosmic-launcher"; license = licenses.gpl3Only; maintainers = with maintainers; [ nyabinary ]; platforms = platforms.linux; }; }