2021-01-15 14:21:58 +01:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper
|
2017-03-19 00:10:44 +01:00
|
|
|
, xorg, imlib2, libjpeg, libpng
|
2021-02-24 20:53:45 +01:00
|
|
|
, curl, libexif, jpegexiforient, perl
|
2020-10-17 21:43:09 +02:00
|
|
|
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
|
2007-03-05 14:44:27 +01:00
|
|
|
|
2021-01-15 14:21:58 +01:00
|
|
|
with lib;
|
2017-03-19 00:10:44 +01:00
|
|
|
|
2013-01-22 14:51:28 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "feh";
|
2021-07-26 11:21:29 +02:00
|
|
|
version = "3.7.1";
|
2007-03-05 14:44:27 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
|
2021-07-26 11:21:29 +02:00
|
|
|
sha256 = "sha256-V6scph9XyWWVh4Bp9VDTb1GFMPiPoxt0zDnNc5+SWLY=";
|
2007-03-05 14:44:27 +01:00
|
|
|
};
|
|
|
|
|
2017-06-17 19:06:20 +02:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
2015-10-11 21:38:03 +02:00
|
|
|
|
2018-08-08 20:19:23 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper xorg.libXt ];
|
2010-06-03 16:41:41 +02:00
|
|
|
|
2016-09-09 15:04:36 +02:00
|
|
|
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
|
2016-09-09 14:16:34 +02:00
|
|
|
|
2018-03-04 15:17:12 +01:00
|
|
|
makeFlags = [
|
2019-02-12 02:43:25 +01:00
|
|
|
"PREFIX=${placeholder "out"}" "exif=1"
|
2020-06-17 02:48:50 +02:00
|
|
|
] ++ optional stdenv.isDarwin "verscmp=0"
|
|
|
|
++ optional enableAutoreload "inotify=1";
|
2017-06-17 19:06:20 +02:00
|
|
|
|
2019-02-12 02:43:25 +01:00
|
|
|
installTargets = [ "install" ];
|
2014-02-16 14:08:48 +01:00
|
|
|
postInstall = ''
|
2019-11-14 02:36:53 +01:00
|
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${makeBinPath [ libjpeg jpegexiforient ]}" \
|
2017-06-17 19:06:20 +02:00
|
|
|
--add-flags '--theme=feh'
|
|
|
|
'';
|
|
|
|
|
2021-02-24 20:53:45 +01:00
|
|
|
checkInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ]));
|
2016-05-31 13:48:40 +02:00
|
|
|
doCheck = true;
|
|
|
|
|
2007-03-05 14:44:27 +01:00
|
|
|
meta = {
|
|
|
|
description = "A light-weight image viewer";
|
2017-09-10 21:25:26 +02:00
|
|
|
homepage = "https://feh.finalrewind.org/";
|
2017-03-19 00:10:44 +01:00
|
|
|
license = licenses.mit;
|
2019-12-26 15:13:48 +01:00
|
|
|
maintainers = with maintainers; [ viric willibutz globin ma27 ];
|
2017-03-19 00:10:44 +01:00
|
|
|
platforms = platforms.unix;
|
2007-03-05 14:44:27 +01:00
|
|
|
};
|
|
|
|
}
|