Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
78 lines
1.9 KiB
Nix
78 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
bash,
|
|
rustPlatform,
|
|
just,
|
|
dbus,
|
|
stdenv,
|
|
xdg-desktop-portal-cosmic,
|
|
nixosTests,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cosmic-session";
|
|
version = "1.0.0-beta.1.1";
|
|
|
|
# nixpkgs-update: no auto update
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-session";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-P3xXYd80P+DR1vVE0zZC+v4ARsGhRrG9N9LdP2BEfDA=";
|
|
};
|
|
|
|
cargoHash = "sha256-bo46A7hS1U0cOsa/T4oMTKUTjxVCaGuFdN2qCjVHxhg=";
|
|
|
|
postPatch = ''
|
|
substituteInPlace data/start-cosmic \
|
|
--replace-fail '/usr/bin/cosmic-session' "${placeholder "out"}/bin/cosmic-session" \
|
|
--replace-fail '/usr/bin/dbus-run-session' "${lib.getBin dbus}/bin/dbus-run-session"
|
|
substituteInPlace data/cosmic.desktop \
|
|
--replace-fail '/usr/bin/start-cosmic' "${placeholder "out"}/bin/start-cosmic"
|
|
'';
|
|
|
|
buildInputs = [ bash ];
|
|
nativeBuildInputs = [ just ];
|
|
|
|
dontUseJustBuild = true;
|
|
|
|
justFlags = [
|
|
"--set"
|
|
"prefix"
|
|
(placeholder "out")
|
|
"--set"
|
|
"cosmic_dconf_profile"
|
|
"${placeholder "out"}/etc/dconf/profile/cosmic"
|
|
"--set"
|
|
"cargo-target-dir"
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
];
|
|
|
|
env = {
|
|
XDP_COSMIC = "${xdg-desktop-portal-cosmic}/libexec/xdg-desktop-portal-cosmic";
|
|
ORCA = "orca"; # get orca from $PATH
|
|
};
|
|
|
|
passthru = {
|
|
providedSessions = [ "cosmic" ];
|
|
tests = {
|
|
inherit (nixosTests)
|
|
cosmic
|
|
cosmic-autologin
|
|
cosmic-noxwayland
|
|
cosmic-autologin-noxwayland
|
|
;
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/pop-os/cosmic-session";
|
|
description = "Session manager for the COSMIC desktop environment";
|
|
license = lib.licenses.gpl3Only;
|
|
mainProgram = "cosmic-session";
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|