2021-01-15 13:21:58 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper
|
2017-03-18 23:10:44 +00:00
|
|
|
, xorg, imlib2, libjpeg, libpng
|
2021-02-24 19:53:45 +00:00
|
|
|
, curl, libexif, jpegexiforient, perl
|
2020-10-17 20:43:09 +01:00
|
|
|
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
|
2007-03-05 13:44:27 +00:00
|
|
|
|
2013-01-22 13:51:28 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "feh";
|
2022-01-07 22:29:03 +00:00
|
|
|
version = "3.8";
|
2007-03-05 13:44:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
|
2022-01-07 22:29:03 +00:00
|
|
|
sha256 = "1a9bsq5j9sl2drzkab0hdhnamalpaszw9mz2prz6scrr5dak8g3z";
|
2007-03-05 13:44:27 +00:00
|
|
|
};
|
|
|
|
|
2017-06-17 18:06:20 +01:00
|
|
|
outputs = [ "out" "man" "doc" ];
|
2015-10-11 20:38:03 +01:00
|
|
|
|
2018-08-08 19:19:23 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper xorg.libXt ];
|
2010-06-03 15:41:41 +01:00
|
|
|
|
2016-09-09 14:04:36 +01:00
|
|
|
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
|
2016-09-09 13:16:34 +01:00
|
|
|
|
2018-03-04 14:17:12 +00:00
|
|
|
makeFlags = [
|
2019-02-12 01:43:25 +00:00
|
|
|
"PREFIX=${placeholder "out"}" "exif=1"
|
2022-01-28 14:23:25 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "verscmp=0"
|
|
|
|
++ lib.optional enableAutoreload "inotify=1";
|
2017-06-17 18:06:20 +01:00
|
|
|
|
2019-02-12 01:43:25 +00:00
|
|
|
installTargets = [ "install" ];
|
2014-02-16 13:08:48 +00:00
|
|
|
postInstall = ''
|
2022-01-28 14:23:25 +00:00
|
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${lib.makeBinPath [ libjpeg jpegexiforient ]}" \
|
2017-06-17 18:06:20 +01:00
|
|
|
--add-flags '--theme=feh'
|
|
|
|
'';
|
|
|
|
|
2021-02-24 19:53:45 +00:00
|
|
|
checkInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ]));
|
2016-05-31 12:48:40 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
2022-01-28 14:23:25 +00:00
|
|
|
meta = with lib; {
|
2007-03-05 13:44:27 +00:00
|
|
|
description = "A light-weight image viewer";
|
2017-09-10 20:25:26 +01:00
|
|
|
homepage = "https://feh.finalrewind.org/";
|
2022-01-28 14:23:25 +00:00
|
|
|
# released under a variant of the MIT license
|
|
|
|
# https://spdx.org/licenses/MIT-feh.html
|
|
|
|
license = licenses.mit-feh;
|
2019-12-26 14:13:48 +00:00
|
|
|
maintainers = with maintainers; [ viric willibutz globin ma27 ];
|
2017-03-18 23:10:44 +00:00
|
|
|
platforms = platforms.unix;
|
2007-03-05 13:44:27 +00:00
|
|
|
};
|
|
|
|
}
|