2016-11-20 19:27:29 +00:00
|
|
|
{ stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline, libiconv }:
|
2005-12-25 14:02:09 +00:00
|
|
|
|
2014-09-21 19:26:28 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-03-30 08:20:22 +01:00
|
|
|
name = "slang-2.3.1a";
|
2005-12-25 14:02:09 +00:00
|
|
|
src = fetchurl {
|
2017-03-30 08:20:22 +01:00
|
|
|
url = "http://www.jedsoft.org/releases/slang/${name}.tar.bz2";
|
|
|
|
sha256 = "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l";
|
2005-12-25 14:02:09 +00:00
|
|
|
};
|
2014-09-22 19:17:33 +01:00
|
|
|
|
2017-07-11 10:14:14 +01:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2015-10-06 10:52:25 +01:00
|
|
|
|
2009-09-16 18:52:54 +01:00
|
|
|
# Fix some wrong hardcoded paths
|
2009-09-16 18:08:33 +01:00
|
|
|
preConfigure = ''
|
2015-10-05 19:32:54 +01: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 18:08:33 +01:00
|
|
|
sed -i -e "s|/bin/ln|ln|" src/Makefile.in
|
2015-10-05 19:32:54 +01:00
|
|
|
sed -i -e "s|-ltermcap|-lncurses|" ./configure
|
2009-09-16 18:08:33 +01:00
|
|
|
'';
|
2016-04-16 18:50:01 +01:00
|
|
|
configureFlags = "--with-png=${libpng.dev} --with-z=${zlib.dev} --with-pcre=${pcre.dev} --with-readline=${readline.dev}";
|
2016-11-20 19:27:29 +00:00
|
|
|
buildInputs = [ pcre libpng zlib readline ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ libiconv ];
|
2015-10-06 10:52:25 +01:00
|
|
|
propagatedBuildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
|
|
|
|
sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
|
|
|
|
'';
|
2014-09-21 19:26:28 +01:00
|
|
|
|
2015-10-06 10:52:25 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-09-21 19:26:28 +01: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 10:52:25 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.fuuzetsu ];
|
2014-09-21 19:26:28 +01:00
|
|
|
};
|
2005-12-25 14:02:09 +00:00
|
|
|
}
|