-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
/
package.nix
82 lines (73 loc) · 1.59 KB
/
package.nix
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
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
cmake,
makeBinaryWrapper,
cosmic-icons,
cosmic-randr,
just,
pkg-config,
libxkbcommon,
libinput,
fontconfig,
freetype,
wayland,
expat,
udev,
util-linux,
}:
rustPlatform.buildRustPackage rec {
pname = "cosmic-settings";
version = "1.0.0-alpha.1";
src = fetchFromGitHub {
owner = "pop-os";
repo = pname;
rev = "epoch-${version}";
hash = "sha256-gTzZvhj7oBuL23dtedqfxUCT413eMoDc0rlNeqCeZ6E=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-zMHJc6ytbOoi9E47Zsg6zhbQKObsaOtVHuPnLAu36I4=";
postPatch = ''
substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
'';
nativeBuildInputs = [
cmake
just
pkg-config
makeBinaryWrapper
];
buildInputs = [
libxkbcommon
libinput
fontconfig
freetype
wayland
expat
udev
util-linux
];
dontUseJustBuild = true;
justFlags = [
"--set"
"prefix"
(placeholder "out")
"--set"
"bin-src"
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-settings"
];
postInstall = ''
wrapProgram "$out/bin/cosmic-settings" \
--prefix PATH : ${lib.makeBinPath [ cosmic-randr ]} \
--suffix XDG_DATA_DIRS : "$out/share:${cosmic-icons}/share"
'';
meta = with lib; {
homepage = "https://github.com/pop-os/cosmic-settings";
description = "Settings for the COSMIC Desktop Environment";
license = licenses.gpl3Only;
maintainers = with maintainers; [ nyabinary ];
platforms = platforms.linux;
mainProgram = "cosmic-settings";
};
}