2024-12-10 20:23:58 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
rustPlatform,
|
|
|
|
fetchFromGitHub,
|
2025-03-21 06:17:26 -03:00
|
|
|
libcosmicAppHook,
|
2024-12-10 20:23:58 +01:00
|
|
|
pkg-config,
|
2025-03-21 06:20:15 -03:00
|
|
|
libdisplay-info,
|
2024-12-10 20:23:58 +01:00
|
|
|
libgbm,
|
2025-03-21 06:17:26 -03:00
|
|
|
libinput,
|
|
|
|
pixman,
|
2024-12-10 20:23:58 +01:00
|
|
|
seatd,
|
|
|
|
udev,
|
|
|
|
systemd,
|
2025-03-21 06:23:24 -03:00
|
|
|
nix-update-script,
|
2025-04-09 02:29:30 +05:30
|
|
|
nixosTests,
|
2025-03-21 06:17:26 -03:00
|
|
|
|
2024-12-10 20:23:58 +01:00
|
|
|
useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
2023-08-21 17:07:25 +00:00
|
|
|
}:
|
|
|
|
|
2025-03-21 06:10:55 -03:00
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
2023-08-21 17:07:25 +00:00
|
|
|
pname = "cosmic-comp";
|
2025-04-25 14:10:18 +05:30
|
|
|
version = "1.0.0-alpha.7";
|
2023-08-21 17:07:25 +00:00
|
|
|
|
2025-04-25 16:42:29 -03:00
|
|
|
# nixpkgs-update: no auto update
|
2023-08-21 17:07:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pop-os";
|
|
|
|
repo = "cosmic-comp";
|
2025-03-21 06:10:55 -03:00
|
|
|
tag = "epoch-${finalAttrs.version}";
|
2025-04-25 14:10:18 +05:30
|
|
|
hash = "sha256-2AnGEUWumE1C4Mi5inN7enbxCdWCKbQdYpUvTK3jGQ4=";
|
2023-08-21 17:07:25 +00:00
|
|
|
};
|
|
|
|
|
2025-04-25 14:10:18 +05:30
|
|
|
cargoHash = "sha256-fj6TIBuZ5hrds4WMHRa2krXN5fivKriO2Q/FWdnlGaA=";
|
2023-08-21 17:07:25 +00:00
|
|
|
|
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2024-12-10 20:23:58 +01:00
|
|
|
nativeBuildInputs = [
|
2025-03-21 06:17:26 -03:00
|
|
|
libcosmicAppHook
|
2024-12-10 20:23:58 +01:00
|
|
|
pkg-config
|
|
|
|
];
|
2025-03-21 06:10:55 -03:00
|
|
|
|
2024-01-20 21:50:23 +01:00
|
|
|
buildInputs = [
|
2025-03-21 06:20:15 -03:00
|
|
|
libdisplay-info
|
2024-12-10 20:23:58 +01:00
|
|
|
libgbm
|
2025-03-21 06:17:26 -03:00
|
|
|
libinput
|
2024-12-10 20:23:58 +01:00
|
|
|
pixman
|
|
|
|
seatd
|
|
|
|
udev
|
2025-07-22 15:19:36 +02:00
|
|
|
]
|
|
|
|
++ lib.optional useSystemd systemd;
|
2024-01-20 21:50:23 +01:00
|
|
|
|
|
|
|
# Only default feature is systemd
|
|
|
|
buildNoDefaultFeatures = !useSystemd;
|
2023-08-21 17:07:25 +00:00
|
|
|
|
2024-10-16 19:00:30 +02:00
|
|
|
makeFlags = [
|
2025-03-21 06:10:55 -03:00
|
|
|
"prefix=${placeholder "out"}"
|
2024-10-16 19:00:30 +02:00
|
|
|
"CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
|
|
];
|
|
|
|
|
2024-11-06 14:41:30 +01:00
|
|
|
dontCargoInstall = true;
|
2024-10-16 19:00:30 +02:00
|
|
|
|
2025-04-09 02:29:30 +05:30
|
|
|
passthru = {
|
|
|
|
tests = {
|
|
|
|
inherit (nixosTests)
|
|
|
|
cosmic
|
|
|
|
cosmic-autologin
|
|
|
|
cosmic-noxwayland
|
|
|
|
cosmic-autologin-noxwayland
|
|
|
|
;
|
|
|
|
};
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
extraArgs = [
|
|
|
|
"--version"
|
|
|
|
"unstable"
|
|
|
|
"--version-regex"
|
|
|
|
"epoch-(.*)"
|
|
|
|
];
|
|
|
|
};
|
2025-03-21 06:23:24 -03:00
|
|
|
};
|
|
|
|
|
2025-03-21 06:10:55 -03:00
|
|
|
meta = {
|
2023-08-21 17:07:25 +00:00
|
|
|
homepage = "https://github.com/pop-os/cosmic-comp";
|
|
|
|
description = "Compositor for the COSMIC Desktop Environment";
|
2024-03-19 03:14:51 +01:00
|
|
|
mainProgram = "cosmic-comp";
|
2025-03-21 06:10:55 -03:00
|
|
|
license = lib.licenses.gpl3Only;
|
2025-04-20 23:33:11 -03:00
|
|
|
teams = [ lib.teams.cosmic ];
|
2025-03-21 06:10:55 -03:00
|
|
|
platforms = lib.platforms.linux;
|
2023-08-21 17:07:25 +00:00
|
|
|
};
|
2025-03-21 06:10:55 -03:00
|
|
|
})
|