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