summary refs log tree commit diff
path: root/pkgs/applications/graphics/fbida/default.nix
blob: cdb5afaac31c597a035ebaf8f95a438ad2ff10a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, fetchurl, libjpeg, libexif, libungif, libtiff, libpng, libwebp, libdrm
, pkgconfig, freetype, fontconfig, which, imagemagick, curl, sane-backends
}:

stdenv.mkDerivation rec {
  name = "fbida-2.11";
  
  src = fetchurl {
    url = "http://dl.bytesex.org/releases/fbida/${name}.tar.gz";
    sha256 = "00x1lppb66b0gvp6sqs7zjgnlfh80lnkwvsm15ifzvlss3b67akw";
  };

  nativeBuildInputs = [ pkgconfig which ];
  buildInputs =
    [ libexif libjpeg libpng libungif freetype fontconfig libtiff libwebp
      imagemagick curl sane-backends libdrm
    ];
  
  makeFlags = [ "prefix=$(out)" "verbose=yes" ];

  patchPhase =
    ''
    sed -e 's@ cpp\>@ gcc -E -@' -i GNUmakefile
    '';

  configurePhase = "make config $makeFlags";

  crossAttrs = {
    makeFlags = makeFlags ++ [ "CC=${stdenv.cross.config}-gcc" "STRIP="];
  };

  meta = with stdenv.lib; {
    description = "Image viewing and manipulation programs";
    homepage = https://www.kraxel.org/blog/linux/fbida/;
    license = licenses.gpl2;
    maintainers = with maintainers; [ pSub ];
  };
}