2017-03-19 00:10:44 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, xorg, imlib2, libjpeg, libpng
|
2016-09-09 15:04:36 +02:00
|
|
|
, curl, libexif, perlPackages }:
|
2007-03-05 14:44:27 +01:00
|
|
|
|
2017-03-19 00:10:44 +01:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2013-01-22 14:51:28 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-03-19 00:10:44 +01:00
|
|
|
name = "feh-${version}";
|
2018-12-16 06:49:56 +01:00
|
|
|
version = "3.1.1";
|
2007-03-05 14:44:27 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-09-10 21:25:26 +02:00
|
|
|
url = "https://feh.finalrewind.org/${name}.tar.bz2";
|
2018-12-16 06:49:56 +01:00
|
|
|
sha256 = "1sy8z6rv5sy1bhk3846hgfdy96wdi874yr2fnxfprks46qp29l31";
|
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 = [
|
|
|
|
"PREFIX=$(out)" "exif=1"
|
|
|
|
] ++ optional stdenv.isDarwin "verscmp=0";
|
2017-06-17 19:06:20 +02:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
pushd man
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
'';
|
2017-03-19 00:10:44 +01:00
|
|
|
|
2014-02-16 14:08:48 +01:00
|
|
|
postInstall = ''
|
2015-10-11 21:38:03 +02:00
|
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \
|
2017-06-17 19:06:20 +02:00
|
|
|
--add-flags '--theme=feh'
|
|
|
|
install -D -m 644 man/*.1 $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
2019-01-06 14:30:57 +01:00
|
|
|
checkInputs = [ perlPackages.perl perlPackages.TestCommand ];
|
2018-08-08 20:19:23 +02:00
|
|
|
preCheck = ''
|
2018-12-15 04:50:31 +01:00
|
|
|
export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}"
|
2016-05-31 13:48:40 +02:00
|
|
|
'';
|
2017-03-21 22:27:55 +01:00
|
|
|
|
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;
|
2017-08-24 20:43:07 +02:00
|
|
|
maintainers = [ maintainers.viric maintainers.willibutz ];
|
2017-03-19 00:10:44 +01:00
|
|
|
platforms = platforms.unix;
|
2007-03-05 14:44:27 +01:00
|
|
|
};
|
|
|
|
}
|