1{
2 lib,
3 stdenv,
4 fetchurl,
5 libGL,
6 libjpeg,
7 libexif,
8 giflib,
9 libtiff,
10 libpng,
11 libwebp,
12 libdrm,
13 pkg-config,
14 freetype,
15 fontconfig,
16 which,
17 imagemagick,
18 curl,
19 sane-backends,
20 libXpm,
21 libepoxy,
22 pixman,
23 poppler,
24 libgbm,
25 lirc,
26}:
27
28stdenv.mkDerivation rec {
29 pname = "fbida";
30 version = "2.14";
31
32 src = fetchurl {
33 url = "http://dl.bytesex.org/releases/fbida/fbida-${version}.tar.gz";
34 sha256 = "0f242mix20rgsqz1llibhsz4r2pbvx6k32rmky0zjvnbaqaw1dwm";
35 };
36
37 patches = [
38 # Upstream patch to fix build on -fno-common toolchains.
39 (fetchurl {
40 name = "no-common.patch";
41 url = "https://git.kraxel.org/cgit/fbida/patch/?id=1bb8a8aa29845378903f3c690e17c0867c820da2";
42 sha256 = "0n5vqbp8wd87q60zfwdf22jirggzngypc02ha34gsj1rd6pvwahi";
43 })
44 ];
45
46 nativeBuildInputs = [
47 pkg-config
48 which
49 ];
50 buildInputs = [
51 libGL
52 libexif
53 libjpeg
54 libpng
55 giflib
56 freetype
57 fontconfig
58 libtiff
59 libwebp
60 imagemagick
61 curl
62 sane-backends
63 libdrm
64 libXpm
65 libepoxy
66 pixman
67 poppler
68 lirc
69 libgbm
70 ];
71
72 makeFlags = [
73 "prefix=$(out)"
74 "verbose=yes"
75 "STRIP="
76 "JPEG_VER=62"
77 ];
78
79 postPatch = ''
80 sed -e 's@ cpp\>@ gcc -E -@' -i GNUmakefile
81 sed -e 's@$(HAVE_LINUX_FB_H)@yes@' -i GNUmakefile
82 '';
83
84 meta = with lib; {
85 description = "Image viewing and manipulation programs including fbi, fbgs, ida, exiftran and thumbnail.cgi";
86 homepage = "https://www.kraxel.org/blog/linux/fbida/";
87 license = licenses.gpl2;
88 maintainers = with maintainers; [ pSub ];
89 platforms = platforms.linux;
90 };
91}