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-01-11 07:51:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "oculante";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.6.63";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "woelper";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-ynxGpx8LLcd4/n9hz/bbhpZUxqX1sPS7LFYPZ22hTxo=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
nasm
|
2023-04-12 12:48:02 +00:00
|
|
|
perl
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
2023-05-24 13:37:59 +00:00
|
|
|
patchelf $out/bin/oculante --add-rpath ${lib.makeLibraryPath [ libxkbcommon libX11 ]}
|
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-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ dit7ya figsoda ];
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
}
|