53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{ stdenv, fetchurl, makeWrapper
|
|
, xorg, imlib2, libjpeg, libpng
|
|
, curl, libexif, perlPackages }:
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "feh-${version}";
|
|
version = "2.23";
|
|
|
|
src = fetchurl {
|
|
url = "https://feh.finalrewind.org/${name}.tar.bz2";
|
|
sha256 = "18922zv8ckm82r1ap1yn7plbk6djpj02za2ahng58sjj2fw3rpqn";
|
|
};
|
|
|
|
outputs = [ "out" "man" "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"
|
|
'';
|
|
|
|
postBuild = ''
|
|
pushd man
|
|
make
|
|
popd
|
|
'';
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${libjpeg.bin}/bin" \
|
|
--add-flags '--theme=feh'
|
|
install -D -m 644 man/*.1 $out/share/man/man1
|
|
'';
|
|
|
|
checkPhase = ''
|
|
PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" make test
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
description = "A light-weight image viewer";
|
|
homepage = "https://feh.finalrewind.org/";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.viric maintainers.willibutz ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|