1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00
nixpkgs/pkgs/applications/graphics/feh/default.nix
2017-03-21 16:27:55 -05:00

46 lines
1.1 KiB
Nix

{ stdenv, fetchurl, makeWrapper
, xorg, imlib2, libjpeg, libpng
, curl, libexif, perlPackages }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "feh-${version}";
version = "2.18.2";
src = fetchurl {
url = "http://feh.finalrewind.org/${name}.tar.bz2";
sha256 = "09f5rfzls4h5jcrp7ylwbiljp5qzc2nbw9p2csv0pnlaixj69gil";
};
outputs = [ "out" "doc" ];
nativeBuildInputs = [ makeWrapper xorg.libXt ]
++ optionals doCheck [ perlPackages.TestCommand perlPackages.TestHarness ];
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
preBuild = ''
makeFlags="PREFIX=$out exif=1"
'';
postInstall = ''
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \
--add-flags '--theme=feh'
'';
checkPhase = ''
PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" make test
'';
doCheck = true;
meta = {
description = "A light-weight image viewer";
homepage = https://derf.homelinux.org/projects/feh/;
license = licenses.mit;
maintainers = [ maintainers.viric ];
platforms = platforms.unix;
};
}