mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +00:00
3eb3b323ea
Required to avoid: > aarch64-unknown-linux-gnu-gcc -g -O2 -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE -DHAVE_LIBCURL -DHAVE_MKSTEMPS -DHAVE_STRVERSCMP -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DHAVE_INOTIFY -DPREFIX=\"/nix/store/8w2gzmyvg703wa9fj3vdpi87rcskan1f-feh-aarch64-unknown-linux-gnu-3.9\" -DPACKAGE=\"feh\" -DVERSION=\"\" -c -o main.o main.c > In file included from main.c:34: > wallpaper.h:31:10: fatal error: X11/Intrinsic.h: No such file or directory > 31 | #include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */ > | ^~~~~~~~~~~~~~~~~ > compilation terminated. > make[1]: *** [<builtin>: main.o] Error 1 > make[1]: Leaving directory '/build/source/src' > make: *** [Makefile:6: build-src] Error 2
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 ];
|
|
|
|
buildInputs = [ xorg.libXt 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;
|
|
};
|
|
}
|