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

45 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{ lib, stdenv, fetchurl, makeWrapper
2017-03-18 23:10:44 +00:00
, xorg, imlib2, libjpeg, libpng
, curl, libexif, jpegexiforient, perl
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
2021-01-15 13:21:58 +00:00
with lib;
2017-03-18 23:10:44 +00:00
stdenv.mkDerivation rec {
pname = "feh";
2021-05-09 19:44:39 +00:00
version = "3.7";
src = fetchurl {
url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
2021-05-09 19:44:39 +00:00
sha256 = "0hdvlrlpjxvmhnjvr32nxgpsw0366higg0gh9h37fxrvdh3v3k87";
};
2017-06-17 17:06:20 +00:00
outputs = [ "out" "man" "doc" ];
2018-08-08 18:19:23 +00:00
nativeBuildInputs = [ makeWrapper xorg.libXt ];
2016-09-09 13:04:36 +00: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 17:06:20 +00:00
installTargets = [ "install" ];
postInstall = ''
wrapProgram "$out/bin/feh" --prefix PATH : "${makeBinPath [ libjpeg jpegexiforient ]}" \
2017-06-17 17:06:20 +00:00
--add-flags '--theme=feh'
'';
checkInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ]));
2016-05-31 11:48:40 +00:00
doCheck = true;
meta = {
description = "A light-weight image viewer";
2017-09-10 19:25:26 +00: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;
};
}