2017-03-18 23:10:44 +00:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, xorg, imlib2, libjpeg, libpng
|
2016-09-09 14:04:36 +01: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}";
|
2017-07-29 18:32:58 +01:00
|
|
|
version = "2.19.1";
|
2007-03-05 13:44:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-01-22 13:51:28 +00:00
|
|
|
url = "http://feh.finalrewind.org/${name}.tar.bz2";
|
2017-07-29 18:32:58 +01:00
|
|
|
sha256 = "1d4ycmai3dpajl0bdr9i56646g4h5j1lb95jjn0nckwcddcj927c";
|
2007-03-05 13:44:27 +00:00
|
|
|
};
|
|
|
|
|
2017-06-17 18:06:20 +01:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
2015-10-11 20:38:03 +01:00
|
|
|
|
2016-09-09 14:04:36 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper xorg.libXt ]
|
2017-03-18 23:10:44 +00:00
|
|
|
++ optionals doCheck [ perlPackages.TestCommand perlPackages.TestHarness ];
|
2010-06-03 15:41:41 +01:00
|
|
|
|
2016-09-09 14:04:36 +01:00
|
|
|
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
|
2016-09-09 13:16:34 +01:00
|
|
|
|
2010-06-03 15:41:41 +01:00
|
|
|
preBuild = ''
|
2015-01-21 09:28:47 +00:00
|
|
|
makeFlags="PREFIX=$out exif=1"
|
2017-06-17 18:06:20 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
pushd man
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
'';
|
2017-03-18 23:10:44 +00:00
|
|
|
|
2014-02-16 13:08:48 +00:00
|
|
|
postInstall = ''
|
2015-10-11 20:38:03 +01:00
|
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \
|
2017-06-17 18:06:20 +01:00
|
|
|
--add-flags '--theme=feh'
|
|
|
|
install -D -m 644 man/*.1 $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
2016-05-31 12:48:40 +01:00
|
|
|
checkPhase = ''
|
|
|
|
PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" make test
|
|
|
|
'';
|
2017-03-21 21:27:55 +00:00
|
|
|
|
2016-05-31 12:48:40 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2007-03-05 13:44:27 +00:00
|
|
|
meta = {
|
|
|
|
description = "A light-weight image viewer";
|
2010-06-03 15:41:41 +01:00
|
|
|
homepage = https://derf.homelinux.org/projects/feh/;
|
2017-03-18 23:10:44 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.viric ];
|
|
|
|
platforms = platforms.unix;
|
2007-03-05 13:44:27 +00:00
|
|
|
};
|
|
|
|
}
|