2024-01-25 14:12:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, xorg
|
|
|
|
, imlib2
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, curl
|
|
|
|
, libexif
|
|
|
|
, jpegexiforient
|
|
|
|
, perl
|
|
|
|
, enableAutoreload ? !stdenv.hostPlatform.isDarwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "feh";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "3.10.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "derf";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "feh";
|
|
|
|
rev = finalAttrs.version;
|
|
|
|
hash = "sha256-378rhZhpcua3UbsY0OcGKGXdMIQCuG84YjJ9vfJhZVs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
buildInputs = [ xorg.libXt xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
2024-01-25 14:12:00 +00:00
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"exif=1"
|
2022-02-20 05:27:41 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "verscmp=0"
|
2024-01-25 14:12:00 +00:00
|
|
|
++ lib.optional enableAutoreload "inotify=1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installTargets = [ "install" ];
|
|
|
|
postInstall = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${lib.makeBinPath [ libjpeg jpegexiforient ]}" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--add-flags '--theme=feh'
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ]));
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A light-weight image viewer";
|
|
|
|
homepage = "https://feh.finalrewind.org/";
|
2022-02-20 05:27:41 +00:00
|
|
|
# released under a variant of the MIT license
|
|
|
|
# https://spdx.org/licenses/MIT-feh.html
|
|
|
|
license = licenses.mit-feh;
|
2024-01-25 14:12:00 +00:00
|
|
|
maintainers = with maintainers; [ gepbird globin viric willibutz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "feh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-01-25 14:12:00 +00:00
|
|
|
})
|