nixpkgs/pkgs/by-name/ce/centerpiece/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.2 KiB
Nix
Raw Normal View History

2024-04-03 19:46:12 +01:00
{ lib
, stdenv
, pkg-config
, dbus
, vulkan-loader
, libGL
, fetchFromGitHub
, rustPlatform
, libxkbcommon
, wayland
2024-06-26 03:34:03 +01:00
, enableX11 ? true, xorg
2024-04-03 19:46:12 +01:00
}:
rustPlatform.buildRustPackage rec {
pname = "centerpiece";
2024-08-11 14:05:59 +01:00
version = "1.1.1";
2024-04-03 19:46:12 +01:00
src = fetchFromGitHub {
owner = "friedow";
repo = "centerpiece";
rev = "v${version}";
2024-08-11 14:05:59 +01:00
hash = "sha256-tZNwMPL1ITWVvoywojsd5j0GIVQt6pOKFLwi7jwqLKg=";
2024-04-03 19:46:12 +01:00
};
2024-08-11 14:05:59 +01:00
cargoHash = "sha256-d5qGuQ8EnIkE/PhI9t4JxtnNbvh3rse9NpowZ+ESZuU=";
2024-04-03 19:46:12 +01:00
nativeBuildInputs = [ pkg-config ];
buildInputs = [
dbus
libGL
libxkbcommon
vulkan-loader
wayland
2024-06-26 03:34:03 +01:00
] ++ lib.optionals enableX11 (with xorg; [
libX11
libXcursor
libXi
libXrandr
]);
2024-04-03 19:46:12 +01:00
postFixup = lib.optional stdenv.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 ];
2024-04-03 19:46:12 +01:00
platforms = platforms.linux;
mainProgram = "centerpiece";
};
}