2014-09-21 20:26:28 +02:00
|
|
|
{ stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline }:
|
2005-12-25 15:02:09 +01:00
|
|
|
|
2014-09-21 20:26:28 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "slang-2.3.0";
|
2005-12-25 15:02:09 +01:00
|
|
|
src = fetchurl {
|
2014-09-22 20:17:33 +02:00
|
|
|
url = "http://www.jedsoft.org/releases/slang/${name}.tar.gz";
|
|
|
|
sha256 = "0aqd2cjabj6nhd4r3dc4vhqif2bf3dmqnrn2gj0xm4gqyfd177jy";
|
2005-12-25 15:02:09 +01:00
|
|
|
};
|
2014-09-22 20:17:33 +02:00
|
|
|
|
2015-10-06 11:52:25 +02:00
|
|
|
outputs = [ "dev" "out" "doc" ];
|
|
|
|
|
2009-09-16 19:52:54 +02:00
|
|
|
# Fix some wrong hardcoded paths
|
2009-09-16 19:08:33 +02:00
|
|
|
preConfigure = ''
|
2015-10-05 20:32:54 +02:00
|
|
|
sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure
|
|
|
|
sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" src/sltermin.c
|
2009-09-16 19:08:33 +02:00
|
|
|
sed -i -e "s|/bin/ln|ln|" src/Makefile.in
|
2015-10-05 20:32:54 +02:00
|
|
|
sed -i -e "s|-ltermcap|-lncurses|" ./configure
|
2009-09-16 19:08:33 +02:00
|
|
|
'';
|
2016-04-16 19:46:17 +02:00
|
|
|
configureFlags = "--with-png=${libpng.dev} --with-z=${zlib} --with-pcre=${pcre.dev} --with-readline=${readline.dev}";
|
2015-10-06 11:52:25 +02:00
|
|
|
buildInputs = [ pcre libpng zlib readline ];
|
|
|
|
propagatedBuildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
|
|
|
|
sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
|
|
|
|
'';
|
2014-09-21 20:26:28 +02:00
|
|
|
|
2015-10-06 11:52:25 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-09-21 20:26:28 +02:00
|
|
|
description = "A multi-platform programmer's library designed to allow a developer to create robust software";
|
|
|
|
homepage = http://www.jedsoft.org/slang/;
|
2015-10-06 11:52:25 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.fuuzetsu ];
|
2014-09-21 20:26:28 +02:00
|
|
|
};
|
2005-12-25 15:02:09 +01:00
|
|
|
}
|