blob: 7d7c7512d8760daa721e38cf5fc5695bb1deeee0 (
plain) (
blame)
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
|
{ lib
, stdenv
, pkg-config
, dbus
, vulkan-loader
, libGL
, fetchFromGitHub
, rustPlatform
, libxkbcommon
, wayland
, enableX11 ? true, xorg
}:
rustPlatform.buildRustPackage rec {
pname = "centerpiece";
version = "1.1.1";
src = fetchFromGitHub {
owner = "friedow";
repo = "centerpiece";
rev = "v${version}";
hash = "sha256-tZNwMPL1ITWVvoywojsd5j0GIVQt6pOKFLwi7jwqLKg=";
};
cargoHash = "sha256-d5qGuQ8EnIkE/PhI9t4JxtnNbvh3rse9NpowZ+ESZuU=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
dbus
libGL
libxkbcommon
vulkan-loader
wayland
] ++ lib.optionals enableX11 (with xorg; [
libX11
libXcursor
libXi
libXrandr
]);
postFixup = lib.optional stdenv.hostPlatform.isLinux ''
rpath=$(patchelf --print-rpath $out/bin/centerpiece)
patchelf --set-rpath "$rpath:${
lib.makeLibraryPath [
libGL
libxkbcommon
vulkan-loader
wayland
]
}" $out/bin/centerpiece
'';
meta = with lib; {
homepage = "https://github.com/friedow/centerpiece";
description = "Your trusty omnibox search";
license = licenses.mit;
maintainers = with maintainers; [ a-kenji friedow ];
platforms = platforms.linux;
mainProgram = "centerpiece";
};
}
|