1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 10:56:53 +00:00
nixpkgs/pkgs/development/libraries/stfl/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, ncurses, libiconv }:
2013-06-02 07:27:00 +01:00
stdenv.mkDerivation rec {
name = "stfl-0.24";
2013-06-02 07:27:00 +01:00
src = fetchurl {
url = "http://www.clifford.at/stfl/${name}.tar.gz";
sha256 = "1460d5lc780p3q38l3wc9jfr2a7zlyrcra0li65aynj738cam9yl";
2013-06-02 07:27:00 +01:00
};
buildInputs = [ ncurses libiconv ];
2013-06-02 07:27:00 +01:00
buildPhase = ''
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.hostPlatform.libc != "glibc") ''
2013-06-02 07:27:00 +01:00
sed -i 's/LDLIBS += -lncursesw/LDLIBS += -lncursesw -liconv/' Makefile
'' + ( stdenv.lib.optionalString stdenv.isDarwin ''
2013-06-02 07:27:00 +01:00
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.24 $out/lib/libstfl.so.0
2013-06-02 07:27:00 +01:00
'';
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;
};
}