summary refs log tree commit diff
path: root/pkgs/os-specific/linux/fbterm/default.nix
blob: 0201422cdf9f51070765d6fd78b1946b7b969fa2 (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
a :  
let 
  fetchurl = a.fetchurl;
  
  buildInputs = with a; [
    gpm freetype fontconfig pkgconfig ncurses
  ];
  s = import ./src-for-default.nix; 
in
rec {
  src = a.fetchUrlFromSrcInfo s; 
  inherit(s) name;
  inherit buildInputs;
  configureFlags = [];

  fixInc = a.fullDepEntry (''
    sed -e '/ifdef SYS_signalfd/atypedef long long loff_t;' -i src/fbterm.cpp
  '') ["doUnpack" "minInit"];

  fixMakeInstall = a.fullDepEntry (''
    sed -e '/install-exec-hook:/,/^[^\t]/{d}; /.NOEXPORT/iinstall-exec-hook:\
    ' -i src/Makefile.in
  '') ["doUnpack" "minInit"];

  setVars = a.noDepEntry (''
    export HOME=$PWD;
    export NIX_LDFLAGS="$NIX_LDFLAGS -lfreetype"
  '') ;

  /* doConfigure should be removed if not needed */
  phaseNames = ["setVars" "fixInc" "fixMakeInstall" "doConfigure" "doMakeInstall"];
      
  meta = {
    description = "Framebuffer terminal emulator";
    maintainers = [a.lib.maintainers.raskin];
  };
}