diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/graphics/feh/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/graphics/feh/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/graphics/feh/default.nix b/nixpkgs/pkgs/applications/graphics/feh/default.nix new file mode 100644 index 000000000000..1eb99a9a7e41 --- /dev/null +++ b/nixpkgs/pkgs/applications/graphics/feh/default.nix @@ -0,0 +1,49 @@ +{ stdenv, fetchurl, makeWrapper +, xorg, imlib2, libjpeg, libpng +, curl, libexif, jpegexiforient, perlPackages }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "feh"; + version = "3.3"; + + src = fetchurl { + url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2"; + sha256 = "04c8cgwzkax481sz7lbzy23mk79bqmjy3qpvr7vxa4c14mc9k5gk"; + }; + + outputs = [ "out" "man" "doc" ]; + + nativeBuildInputs = [ makeWrapper xorg.libXt ]; + + buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ]; + + makeFlags = [ + "PREFIX=${placeholder "out"}" "exif=1" + ] ++ optional stdenv.isDarwin "verscmp=0"; + + installTargets = [ "install" ]; + postInstall = '' + wrapProgram "$out/bin/feh" --prefix PATH : "${makeBinPath [ libjpeg jpegexiforient ]}" \ + --add-flags '--theme=feh' + ''; + + checkInputs = [ perlPackages.perl perlPackages.TestCommand ]; + preCheck = '' + export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}" + ''; + postCheck = '' + unset PERL5LIB + ''; + + doCheck = true; + + meta = { + description = "A light-weight image viewer"; + homepage = "https://feh.finalrewind.org/"; + license = licenses.mit; + maintainers = with maintainers; [ viric willibutz globin ma27 ]; + platforms = platforms.unix; + }; +} |