forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.nix
More file actions
90 lines (76 loc) · 1.71 KB
/
Copy pathpackage.nix
File metadata and controls
90 lines (76 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
libcosmicAppHook,
pkg-config,
libdisplay-info_0_2,
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.14";
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "pop-os";
repo = "cosmic-comp";
tag = "epoch-${finalAttrs.version}";
hash = "sha256-tfwgZc23V+UdtqEhQvUi7PFA6W56Ta1BWZe1ibnIdrk=";
};
cargoHash = "sha256-XdQK0p76zokFluxFM2ezvNBuqW7vqyked/3FGCvTAMo=";
separateDebugInfo = true;
__structuredAttrs = true;
nativeBuildInputs = [
libcosmicAppHook
pkg-config
];
buildInputs = [
libdisplay-info_0_2
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-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;
};
})