blob: e257a7d46eba059d3d24d7fe5f23b30ac79d57a0 (
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
|
# Quick version to be able to cross-build fbterm meanwhile builderDefs cannot
# cross-build with an equivalent to the stdenvCross adapter.
{ stdenv, fetchurl, gpm, freetype, fontconfig, pkgconfig, ncurses }:
let
version="1.7";
name="fbterm-1.7";
hash="19qjb2zb4gwr1jlybmalaw3y3zybvc8vliwj85dfabmill1k1afh";
url="http://fbterm.googlecode.com/files/fbterm-${version}.tar.gz";
in
stdenv.mkDerivation {
inherit name;
src = fetchurl {
inherit url;
sha256 = hash;
};
buildNativeInputs = [ ncurses ];
buildInputs = [ gpm freetype fontconfig pkgconfig ];
preConfigure = ''
sed -e '/ifdef SYS_signalfd/atypedef long long loff_t;' -i src/fbterm.cpp
sed -e '/install-exec-hook:/,/^[^\t]/{d}; /.NOEXPORT/iinstall-exec-hook:\
' -i src/Makefile.in
export HOME=$PWD;
export NIX_LDFLAGS="$NIX_LDFLAGS -lfreetype"
# This is only relevant cross-building
export NIX_CROSS_LDFLAGS="$NIX_CROSS_LDFLAGS -lfreetype"
'';
}
|