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

52 lines
1.4 KiB
Nix
Raw Normal View History

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