e7ec2969af
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
77 lines
1.4 KiB
Nix
77 lines
1.4 KiB
Nix
{ 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";
|
|
version = "10.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ArturKovacs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-9M9FyDehony5+1UwtEk7bRjBAlV4GvhtABi0MpjYcIA=";
|
|
};
|
|
|
|
cargoHash = "sha256-fcZCFD4XBHFIhwZtpYLkv8oDe+TmhvUEKFY3iJAMdFI=";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
makeWrapper
|
|
pkg-config
|
|
python3
|
|
];
|
|
|
|
buildInputs = rpathLibs ++ lib.optionals stdenv.isDarwin [
|
|
AppKit
|
|
CoreGraphics
|
|
CoreServices
|
|
Foundation
|
|
OpenGL
|
|
];
|
|
|
|
postFixup = lib.optionalString stdenv.isLinux ''
|
|
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/emulsion
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|