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

50 lines
1.3 KiB
Nix
Raw Normal View History

2017-03-19 00:10:44 +01:00
{ stdenv, fetchurl, makeWrapper
, xorg, imlib2, libjpeg, libpng
, curl, libexif, jpegexiforient, perlPackages }:
2017-03-19 00:10:44 +01:00
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "feh";
2019-12-08 06:49:54 +01:00
version = "3.3";
src = fetchurl {
url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
2019-12-08 06:49:54 +01:00
sha256 = "04c8cgwzkax481sz7lbzy23mk79bqmjy3qpvr7vxa4c14mc9k5gk";
};
2017-06-17 19:06:20 +02:00
outputs = [ "out" "man" "doc" ];
2018-08-08 20:19:23 +02:00
nativeBuildInputs = [ makeWrapper xorg.libXt ];
2016-09-09 15:04:36 +02:00
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
2018-03-04 15:17:12 +01:00
makeFlags = [
"PREFIX=${placeholder "out"}" "exif=1"
2018-03-04 15:17:12 +01:00
] ++ optional stdenv.isDarwin "verscmp=0";
2017-06-17 19:06:20 +02:00
installTargets = [ "install" ];
postInstall = ''
wrapProgram "$out/bin/feh" --prefix PATH : "${makeBinPath [ libjpeg jpegexiforient ]}" \
2017-06-17 19:06:20 +02:00
--add-flags '--theme=feh'
'';
2019-01-06 14:30:57 +01:00
checkInputs = [ perlPackages.perl perlPackages.TestCommand ];
2018-08-08 20:19:23 +02:00
preCheck = ''
export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}"
2016-05-31 13:48:40 +02:00
'';
postCheck = ''
unset PERL5LIB
'';
2017-03-21 22:27:55 +01:00
2016-05-31 13:48:40 +02:00
doCheck = true;
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;
maintainers = with maintainers; [ viric willibutz globin ];
2017-03-19 00:10:44 +01:00
platforms = platforms.unix;
};
}