90 lines
1.7 KiB
Nix
Raw Permalink Normal View History

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
2025-03-21 06:17:26 -03:00
libcosmicAppHook,
pkg-config,
libdisplay-info,
libgbm,
2025-03-21 06:17:26 -03:00
libinput,
pixman,
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
useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
}:
2025-03-21 06:10:55 -03:00
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cosmic-comp";
version = "1.0.0-alpha.7";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "pop-os";
repo = "cosmic-comp";
2025-03-21 06:10:55 -03:00
tag = "epoch-${finalAttrs.version}";
hash = "sha256-2AnGEUWumE1C4Mi5inN7enbxCdWCKbQdYpUvTK3jGQ4=";
};
cargoHash = "sha256-fj6TIBuZ5hrds4WMHRa2krXN5fivKriO2Q/FWdnlGaA=";
separateDebugInfo = true;
nativeBuildInputs = [
2025-03-21 06:17:26 -03:00
libcosmicAppHook
pkg-config
];
2025-03-21 06:10:55 -03:00
buildInputs = [
libdisplay-info
libgbm
2025-03-21 06:17:26 -03:00
libinput
pixman
seatd
udev
2025-07-22 15:19:36 +02:00
]
++ lib.optional useSystemd systemd;
# Only default feature is systemd
buildNoDefaultFeatures = !useSystemd;
makeFlags = [
2025-03-21 06:10:55 -03:00
"prefix=${placeholder "out"}"
"CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}"
];
dontCargoInstall = true;
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 = {
homepage = "https://github.com/pop-os/cosmic-comp";
description = "Compositor for the COSMIC Desktop Environment";
mainProgram = "cosmic-comp";
2025-03-21 06:10:55 -03:00
license = lib.licenses.gpl3Only;
teams = [ lib.teams.cosmic ];
2025-03-21 06:10:55 -03:00
platforms = lib.platforms.linux;
};
2025-03-21 06:10:55 -03:00
})