mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
53 lines
1.6 KiB
Nix
53 lines
1.6 KiB
Nix
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
|
, xorg, imlib2, libjpeg, libpng
|
|
, curl, libexif, jpegexiforient, perl
|
|
, enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "feh";
|
|
version = "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "derf";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-rgNC4M1TJ5EPeWmVHVzgaxTGLY7CYQf7uOsOn5bkwKE=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace test/feh.t \
|
|
--replace "WARNING:" "WARNING: While loading" \
|
|
--replace "Does not look like an image \(magic bytes missing\)" "Unknown error \(15\)"
|
|
'';
|
|
|
|
outputs = [ "out" "man" "doc" ];
|
|
|
|
nativeBuildInputs = [ makeWrapper xorg.libXt ];
|
|
|
|
buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=${placeholder "out"}" "exif=1"
|
|
] ++ lib.optional stdenv.isDarwin "verscmp=0"
|
|
++ lib.optional enableAutoreload "inotify=1";
|
|
|
|
installTargets = [ "install" ];
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/feh" --prefix PATH : "${lib.makeBinPath [ libjpeg jpegexiforient ]}" \
|
|
--add-flags '--theme=feh'
|
|
'';
|
|
|
|
nativeCheckInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ]));
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "A light-weight image viewer";
|
|
homepage = "https://feh.finalrewind.org/";
|
|
# released under a variant of the MIT license
|
|
# https://spdx.org/licenses/MIT-feh.html
|
|
license = licenses.mit-feh;
|
|
maintainers = with maintainers; [ viric willibutz globin ma27 ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|