2014-11-26 23:16:50 +00:00
|
|
|
{ stdenv, fetchurl, ncurses, libiconv }:
|
2013-06-02 07:27:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "stfl-0.22";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.clifford.at/stfl/${name}.tar.gz";
|
|
|
|
sha256 = "062lqlf3qhp8bcapbpc0k3wym7x6ngncql8jmx5x06p6679szp9d";
|
|
|
|
};
|
|
|
|
|
2014-11-26 23:16:50 +00:00
|
|
|
buildInputs = [ ncurses libiconv ];
|
2013-06-02 07:27:00 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
2016-08-12 06:08:08 +01:00
|
|
|
sed -i s/gcc/cc/g Makefile
|
2013-06-02 07:27:00 +01:00
|
|
|
sed -i s%ncursesw/ncurses.h%ncurses.h% stfl_internals.h
|
|
|
|
'' + ( stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i 's/LDLIBS += -lncursesw/LDLIBS += -lncursesw -liconv/' Makefile
|
|
|
|
sed -i s/-soname/-install_name/ Makefile
|
|
|
|
'' ) + ''
|
|
|
|
make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
DESTDIR=$out prefix=\"\" make install
|
|
|
|
|
|
|
|
# some programs rely on libstfl.so.0 to be present, so link it
|
|
|
|
ln -s $out/lib/libstfl.so.0.22 $out/lib/libstfl.so.0
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.clifford.at/stfl/;
|
|
|
|
description = "A library which implements a curses-based widget set for text terminals";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
|
|
|
license = stdenv.lib.licenses.lgpl3;
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|