Files
nixpkgs/pkgs/by-name/oc/oculante/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

94 lines
1.8 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
pkg-config,
openssl,
fontconfig,
nasm,
libX11,
libXcursor,
libXrandr,
libXi,
libGL,
libxkbcommon,
wayland,
stdenv,
gtk3,
perl,
wrapGAppsHook3,
}:
rustPlatform.buildRustPackage rec {
pname = "oculante";
version = "0.9.2";
src = fetchFromGitHub {
owner = "woelper";
repo = "oculante";
rev = version;
hash = "sha256-3kDrsD24/TNcA7NkwwCHN4ez1bC5MP7g28H3jaO/M7E=";
};
cargoHash = "sha256-lksAPT1nuwN5bh3x7+EN4B8ksGtvemt4tbm6/3gqdgE=";
nativeBuildInputs = [
cmake
pkg-config
nasm
perl
wrapGAppsHook3
];
buildInputs = [
openssl
fontconfig
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libGL
libX11
libXcursor
libXi
libXrandr
gtk3
libxkbcommon
wayland
];
checkFlags = [
"--skip=bench"
"--skip=tests::net" # requires network access
"--skip=tests::flathub"
"--skip=thumbnails::test_thumbs" # broken as of v0.9.2
];
postInstall = ''
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
wrapProgram $out/bin/oculante \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath (
[
libGL
libxkbcommon
]
++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ]
)
}
'';
meta = {
broken = stdenv.hostPlatform.isDarwin;
description = "Minimalistic crossplatform image viewer written in Rust";
homepage = "https://github.com/woelper/oculante";
changelog = "https://github.com/woelper/oculante/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
mainProgram = "oculante";
maintainers = with lib.maintainers; [
dit7ya
figsoda
];
};
}