2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, fontconfig
|
|
|
|
, nasm
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXrandr
|
|
|
|
, libXi
|
|
|
|
, libGL
|
2023-05-24 13:37:59 +00:00
|
|
|
, libxkbcommon
|
|
|
|
, wayland
|
2023-01-11 07:51:40 +00:00
|
|
|
, stdenv
|
|
|
|
, gtk3
|
|
|
|
, darwin
|
2023-04-12 12:48:02 +00:00
|
|
|
, perl
|
2023-11-16 04:20:00 +00:00
|
|
|
, wrapGAppsHook
|
2023-01-11 07:51:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "oculante";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.8.18";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "woelper";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "oculante";
|
2023-01-11 07:51:40 +00:00
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-TLY6ydYeRuT93jjUeE7EaFNNllwla4h563UhXAxSyko=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoHash = "sha256-RKJE09Z4XxRLWQ95Om3tru4rI2TD7XmxoHhPHFirREo=";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
nasm
|
2023-04-12 12:48:02 +00:00
|
|
|
perl
|
2023-11-16 04:20:00 +00:00
|
|
|
wrapGAppsHook
|
2023-01-11 07:51:40 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkFlagsArray = [ "--skip=tests::net" ]; # requires network access
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
fontconfig
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2023-05-24 13:37:59 +00:00
|
|
|
libGL
|
2023-01-11 07:51:40 +00:00
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
libXrandr
|
|
|
|
gtk3
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
libxkbcommon
|
|
|
|
wayland
|
2023-01-11 07:51:40 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.libobjc
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
checkFlags = [
|
|
|
|
"--skip=bench"
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 $src/res/oculante.png -t $out/share/icons/hicolor/128x128/apps/
|
|
|
|
install -Dm444 $src/res/oculante.desktop -t $out/share/applications
|
2024-01-25 14:12:00 +00:00
|
|
|
wrapProgram $out/bin/oculante \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [libGL]}
|
2023-01-11 07:51:40 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
broken = stdenv.isDarwin;
|
|
|
|
description = "A minimalistic crossplatform image viewer written in Rust";
|
|
|
|
homepage = "https://github.com/woelper/oculante";
|
|
|
|
changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "oculante";
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya figsoda ];
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
}
|