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