Merge pull request #301329 from a-kenji/init/centerpiece

centerpiece: init at 1.0.0
This commit is contained in:
Aleksana 2024-04-05 10:56:00 +08:00 committed by GitHub
commit bc30484a87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,55 @@
{ lib
, stdenv
, pkg-config
, dbus
, vulkan-loader
, libGL
, fetchFromGitHub
, rustPlatform
, libxkbcommon
, wayland
}:
rustPlatform.buildRustPackage rec {
pname = "centerpiece";
version = "1.0.0";
src = fetchFromGitHub {
owner = "friedow";
repo = "centerpiece";
rev = "v${version}";
hash = "sha256-I630XrmyRAjVxFvISo2eIUP3YmivZovnV89Xsx5OduY=";
};
cargoHash = "sha256-yvvMe1zBUREqRzp/0zYsu7AoXS9Jqq67DY5uMParhEs=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
dbus
libGL
libxkbcommon
vulkan-loader
wayland
];
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 ];
platforms = platforms.linux;
mainProgram = "centerpiece";
};
}