2017-11-13 21:50:28 +01:00
|
|
|
{stdenv, lib, fetchurl, gpm, freetype, fontconfig, pkgconfig, ncurses, libx86}:
|
2012-12-04 08:47:40 +01:00
|
|
|
let
|
|
|
|
s = # Generated upstream information
|
2019-08-13 23:52:01 +02:00
|
|
|
{
|
2012-12-04 08:47:40 +01:00
|
|
|
baseName="fbterm";
|
|
|
|
version="1.7.0";
|
|
|
|
name="fbterm-1.7.0";
|
|
|
|
hash="0pciv5by989vzvjxsv1jsv4bdp4m8j0nfbl29jm5fwi12w4603vj";
|
2018-08-23 19:54:46 +02:00
|
|
|
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/fbterm/fbterm-1.7.0.tar.gz";
|
2012-12-04 08:47:40 +01:00
|
|
|
sha256="0pciv5by989vzvjxsv1jsv4bdp4m8j0nfbl29jm5fwi12w4603vj";
|
|
|
|
};
|
2017-11-13 21:50:28 +01:00
|
|
|
buildInputs = [gpm freetype fontconfig ncurses]
|
|
|
|
++ lib.optional (stdenv.isi686 || stdenv.isx86_64) libx86;
|
2008-12-08 13:44:42 +01:00
|
|
|
in
|
2012-12-04 08:47:40 +01:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
src = fetchurl {
|
|
|
|
inherit (s) url sha256;
|
|
|
|
};
|
2017-10-08 20:53:13 +02:00
|
|
|
|
2019-10-27 17:02:34 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ncurses ];
|
2008-12-08 13:44:42 +01:00
|
|
|
inherit buildInputs;
|
2017-10-08 20:53:13 +02:00
|
|
|
|
2012-12-04 08:47:40 +01:00
|
|
|
preConfigure = ''
|
2009-05-10 14:29:36 +02:00
|
|
|
sed -e '/ifdef SYS_signalfd/atypedef long long loff_t;' -i src/fbterm.cpp
|
2009-10-28 00:49:59 +01:00
|
|
|
sed -e '/install-exec-hook:/,/^[^\t]/{d}; /.NOEXPORT/iinstall-exec-hook:\
|
|
|
|
' -i src/Makefile.in
|
|
|
|
export HOME=$PWD;
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lfreetype"
|
2012-12-04 08:47:40 +01:00
|
|
|
'';
|
2017-02-19 17:29:42 +01:00
|
|
|
preBuild = ''
|
|
|
|
mkdir -p "$out/share/terminfo"
|
|
|
|
tic -a -v2 -o"$out/share/terminfo" terminfo/fbterm
|
2019-10-27 17:02:34 +01:00
|
|
|
makeFlagsArray+=("AR=$AR")
|
2017-02-19 17:29:42 +01:00
|
|
|
'';
|
2017-08-28 13:53:06 +02:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# fixes from Arch Linux package
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/glitsj16/fbterm-patched/d1fe03313be4654dd0a1c0bb5f51530732345134/gcc-6-build-fixes.patch";
|
|
|
|
sha256 = "1kl9fjnrri6pamjdl4jpkqxk5wxcf6jcchv5801xz8vxp4542m40";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/glitsj16/fbterm-patched/d1fe03313be4654dd0a1c0bb5f51530732345134/insertmode-fix.patch";
|
|
|
|
sha256 = "1bad9mqcfpqb94lpx23lsamlhplil73ahzin2xjva0gl3gr1038l";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/glitsj16/fbterm-patched/d1fe03313be4654dd0a1c0bb5f51530732345134/miscoloring-fix.patch";
|
|
|
|
sha256 = "1mjszji0jgs2jsagjp671fv0d1983wmxv009ff1jfhi9pbay6jd0";
|
|
|
|
})
|
2019-10-27 17:02:34 +01:00
|
|
|
./select.patch
|
2017-08-28 13:53:06 +02:00
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2012-12-04 08:47:40 +01:00
|
|
|
inherit (s) version;
|
2008-12-08 13:44:42 +01:00
|
|
|
description = "Framebuffer terminal emulator";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://code.google.com/archive/p/fbterm/";
|
2018-08-23 17:52:40 +02:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2008-12-08 13:44:42 +01:00
|
|
|
};
|
|
|
|
}
|