summaryrefslogtreecommitdiffstats
path: root/pkgs/os-specific/linux/fbterm
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-11-26 17:56:23 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2010-11-26 17:56:23 +0000
commite18cbe33e6bcd4dd6b263747241451281fe153dd (patch)
tree3db06c0e54c371fc996950d7202ee9169b314155 /pkgs/os-specific/linux/fbterm
parent5103335a612a58c6e8bfb00d4fd066591815fa6d (diff)
Adding a fbterm variant building with stdenv to get cross-build-ability
(I want it in the nanonote) svn path=/nixpkgs/branches/stdenv-updates/; revision=24880
Diffstat (limited to 'pkgs/os-specific/linux/fbterm')
-rw-r--r--pkgs/os-specific/linux/fbterm/stdenv.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/fbterm/stdenv.nix b/pkgs/os-specific/linux/fbterm/stdenv.nix
new file mode 100644
index 000000000000..e57e528d2e36
--- /dev/null
+++ b/pkgs/os-specific/linux/fbterm/stdenv.nix
@@ -0,0 +1,32 @@
+# 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.5";
+ name="fbterm-1.5";
+ hash="05qzc6g9a79has3cy7dlw70n4pn13r552a2i1g4xy23acnpvvjsb";
+ 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 ];
+
+ patchPhase = ''
+ 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"
+ '';
+}