oculante: fix icon, add wayland support

wayland linux only
This commit is contained in:
RAVENz46 2025-01-15 19:55:26 +09:00
parent a712dc6708
commit 1f4629016e

View File

@ -54,7 +54,6 @@ rustPlatform.buildRustPackage rec {
libXi libXi
libXrandr libXrandr
gtk3 gtk3
libxkbcommon libxkbcommon
wayland wayland
] ]
@ -69,20 +68,28 @@ rustPlatform.buildRustPackage rec {
]; ];
postInstall = '' postInstall = ''
install -Dm444 $src/res/icons/icon.png -t $out/share/icons/hicolor/128x128/apps/ install -Dm444 $src/res/icons/icon.png $out/share/icons/hicolor/128x128/apps/oculante.png
install -Dm444 $src/res/oculante.desktop -t $out/share/applications install -Dm444 $src/res/oculante.desktop -t $out/share/applications
wrapProgram $out/bin/oculante \ wrapProgram $out/bin/oculante \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL ]} --prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath (
[
libGL
libxkbcommon
]
++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]
)
}
''; '';
meta = with lib; { meta = {
broken = stdenv.hostPlatform.isDarwin; broken = stdenv.hostPlatform.isDarwin;
description = "Minimalistic crossplatform image viewer written in Rust"; description = "Minimalistic crossplatform image viewer written in Rust";
homepage = "https://github.com/woelper/oculante"; homepage = "https://github.com/woelper/oculante";
changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md"; changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md";
license = licenses.mit; license = lib.licenses.mit;
mainProgram = "oculante"; mainProgram = "oculante";
maintainers = with maintainers; [ maintainers = with lib.maintainers; [
dit7ya dit7ya
figsoda figsoda
]; ];