90 lines
1.7 KiB
Nix
90 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
libcosmicAppHook,
|
|
pkg-config,
|
|
libdisplay-info,
|
|
libgbm,
|
|
libinput,
|
|
pixman,
|
|
seatd,
|
|
udev,
|
|
systemd,
|
|
nix-update-script,
|
|
nixosTests,
|
|
|
|
useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
|
|
}:
|
|
|
|
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";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-2AnGEUWumE1C4Mi5inN7enbxCdWCKbQdYpUvTK3jGQ4=";
|
|
};
|
|
|
|
cargoHash = "sha256-fj6TIBuZ5hrds4WMHRa2krXN5fivKriO2Q/FWdnlGaA=";
|
|
|
|
separateDebugInfo = true;
|
|
|
|
nativeBuildInputs = [
|
|
libcosmicAppHook
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libdisplay-info
|
|
libgbm
|
|
libinput
|
|
pixman
|
|
seatd
|
|
udev
|
|
]
|
|
++ lib.optional useSystemd systemd;
|
|
|
|
# Only default feature is systemd
|
|
buildNoDefaultFeatures = !useSystemd;
|
|
|
|
makeFlags = [
|
|
"prefix=${placeholder "out"}"
|
|
"CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
];
|
|
|
|
dontCargoInstall = true;
|
|
|
|
passthru = {
|
|
tests = {
|
|
inherit (nixosTests)
|
|
cosmic
|
|
cosmic-autologin
|
|
cosmic-noxwayland
|
|
cosmic-autologin-noxwayland
|
|
;
|
|
};
|
|
updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version"
|
|
"unstable"
|
|
"--version-regex"
|
|
"epoch-(.*)"
|
|
];
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/pop-os/cosmic-comp";
|
|
description = "Compositor for the COSMIC Desktop Environment";
|
|
mainProgram = "cosmic-comp";
|
|
license = lib.licenses.gpl3Only;
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|