mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Refactored cosmic packages to follow a consistent attribute sorting order Signed-off-by: Kajus Naujokaitis <kajusn@gmail.com>
85 lines
1.9 KiB
Nix
85 lines
1.9 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
bash,
|
|
rustPlatform,
|
|
just,
|
|
dbus,
|
|
stdenv,
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cosmic-session";
|
|
version = "1.1.0";
|
|
|
|
# nixpkgs-update: no auto update
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-session";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-FphY53MaOUUR2oQfZak3HbT+kvysUnw2AIc4L9O+TcU=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace data/start-cosmic \
|
|
--replace-fail '/usr/bin/cosmic-session' "$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' "$out/bin/start-cosmic"
|
|
'';
|
|
|
|
cargoHash = "sha256-5dLG40X+yxJo566guyHqOCLNp+uNSE+HONS8GIDm58A=";
|
|
|
|
separateDebugInfo = true;
|
|
__structuredAttrs = true;
|
|
|
|
env.ORCA = "orca"; # get orca from $PATH
|
|
|
|
nativeBuildInputs = [ just ];
|
|
|
|
buildInputs = [ bash ];
|
|
|
|
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}"
|
|
];
|
|
|
|
passthru = {
|
|
providedSessions = [ "cosmic" ];
|
|
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-session";
|
|
description = "Session manager for the COSMIC desktop environment";
|
|
license = lib.licenses.gpl3Only;
|
|
mainProgram = "cosmic-session";
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|