nixpkgs/pkgs/by-name/co/cosmic-launcher/package.nix
Kajus Naujokaitis 8bed1ba09d
cosmic: sort package attributes into consistent order
Refactored cosmic packages to follow a consistent attribute sorting order

Signed-off-by: Kajus Naujokaitis <kajusn@gmail.com>
2026-07-06 10:28:51 +03:00

74 lines
1.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
just,
libcosmicAppHook,
nix-update-script,
nixosTests,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cosmic-launcher";
version = "1.1.0";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "pop-os";
repo = "cosmic-launcher";
tag = "epoch-${finalAttrs.version}";
hash = "sha256-9U64nSeI47bkc8BQU9ilXBlHQRGS2zC/FcBKc7Z17RY=";
};
cargoHash = "sha256-WnZAPQR8hGGNC5S7hPmcGSMs9HrOw4/wqJR151eIgHY=";
separateDebugInfo = true;
__structuredAttrs = true;
env."CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_RUSTFLAGS" = "--cfg tokio_unstable";
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-launcher";
description = "Launcher for the COSMIC Desktop Environment";
mainProgram = "cosmic-launcher";
license = lib.licenses.gpl3Only;
teams = [ lib.teams.cosmic ];
platforms = lib.platforms.linux;
};
})