mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
78 lines
1.4 KiB
Nix
78 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 = "11.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ArturKovacs";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-0t+MUZu1cvkJSL9Ly9kblH8fMr05KuRpOo+JDn/VUc8=";
|
|
};
|
|
|
|
cargoHash = "sha256-detJZRnxT3FubaF/A4w2pFdhW03BH0gsaeuNFYu+cBw=";
|
|
|
|
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 = "Fast and minimalistic image viewer";
|
|
homepage = "https://arturkovacs.github.io/emulsion-website/";
|
|
maintainers = [ maintainers.magnetophon ];
|
|
platforms = platforms.unix;
|
|
license = licenses.mit;
|
|
mainProgram = "emulsion";
|
|
};
|
|
}
|