nixpkgs/pkgs/applications/graphics/feh/default.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

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 }:
2017-03-18 23:10:44 +00:00
with stdenv.lib;
stdenv.mkDerivation rec {
2017-03-18 23:10:44 +00:00
name = "feh-${version}";
2017-08-24 18:43:07 +00:00
version = "2.19.3";
src = fetchurl {
url = "http://feh.finalrewind.org/${name}.tar.bz2";
2017-08-24 18:43:07 +00:00
sha256 = "1l3yvv0l0ggwlfyhk84p2g9mrqvzqrg1fgalf88kzppvb9jppjay";
};
2017-06-17 17:06:20 +00:00
outputs = [ "out" "man" "doc" ];
2016-09-09 13:04:36 +00:00
nativeBuildInputs = [ makeWrapper xorg.libXt ]
2017-03-18 23:10:44 +00:00
++ optionals doCheck [ perlPackages.TestCommand perlPackages.TestHarness ];
2016-09-09 13:04:36 +00:00
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
preBuild = ''
2015-01-21 09:28:47 +00:00
makeFlags="PREFIX=$out exif=1"
2017-06-17 17:06:20 +00:00
'';
postBuild = ''
pushd man
make
popd
'';
2017-03-18 23:10:44 +00:00
postInstall = ''
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \
2017-06-17 17:06:20 +00:00
--add-flags '--theme=feh'
install -D -m 644 man/*.1 $out/share/man/man1
'';
2016-05-31 11:48:40 +00:00
checkPhase = ''
PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" make test
'';
2017-03-21 21:27:55 +00:00
2016-05-31 11:48:40 +00:00
doCheck = true;
meta = {
description = "A light-weight image viewer";
homepage = https://derf.homelinux.org/projects/feh/;
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;
};
}