2020-12-28 21:14:17 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
|
|
|
, makeWrapper
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXi
|
|
|
|
, libXrandr
|
|
|
|
, libXxf86vm
|
|
|
|
, libxcb
|
|
|
|
, libxkbcommon
|
|
|
|
, wayland
|
|
|
|
, AppKit
|
|
|
|
, CoreGraphics
|
|
|
|
, CoreServices
|
|
|
|
, Foundation
|
|
|
|
, OpenGL
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
rpathLibs = [
|
|
|
|
libGL
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
libXrandr
|
|
|
|
libXxf86vm
|
|
|
|
libxcb
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
libxkbcommon
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "emulsion";
|
2024-05-05 15:11:07 +02:00
|
|
|
version = "11.0";
|
2020-12-28 21:14:17 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ArturKovacs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-05-05 15:11:07 +02:00
|
|
|
sha256 = "sha256-0t+MUZu1cvkJSL9Ly9kblH8fMr05KuRpOo+JDn/VUc8=";
|
2020-12-28 21:14:17 +01:00
|
|
|
};
|
|
|
|
|
2024-05-05 15:11:07 +02:00
|
|
|
cargoHash = "sha256-detJZRnxT3FubaF/A4w2pFdhW03BH0gsaeuNFYu+cBw=";
|
2020-12-28 21:14:17 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = rpathLibs ++ lib.optionals stdenv.isDarwin [
|
|
|
|
AppKit
|
|
|
|
CoreGraphics
|
|
|
|
CoreServices
|
|
|
|
Foundation
|
|
|
|
OpenGL
|
|
|
|
];
|
|
|
|
|
2021-05-07 20:26:15 +02:00
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
|
|
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/emulsion
|
2020-12-28 21:14:17 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast and minimalistic image viewer";
|
|
|
|
homepage = "https://arturkovacs.github.io/emulsion-website/";
|
|
|
|
maintainers = [ maintainers.magnetophon ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
2024-02-11 03:19:15 +01:00
|
|
|
mainProgram = "emulsion";
|
2020-12-28 21:14:17 +01:00
|
|
|
};
|
|
|
|
}
|