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 18:26:28 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-05-10 05:25:31 +00:00
|
|
|
name = "slang-2.3.2";
|
2005-12-25 14:02:09 +00:00
|
|
|
src = fetchurl {
|
2018-06-28 18:43:35 +00:00
|
|
|
url = "https://www.jedsoft.org/releases/slang/${name}.tar.bz2";
|
2018-05-10 05:25:31 +00:00
|
|
|
sha256 = "06p379fqn6w38rdpqi98irxi2bf4llb0rja3dlgkqz7nqh7kp7pw";
|
2005-12-25 14:02:09 +00:00
|
|
|
};
|
2014-09-22 18:17:33 +00:00
|
|
|
|
2017-07-11 09:14:14 +00:00
|
|
|
outputs = [ "out" "dev" "man" "doc" ];
|
2015-10-06 09:52:25 +00:00
|
|
|
|
2018-11-24 00:00:46 +00:00
|
|
|
patches = [ ./terminfo-dirs.patch ];
|
|
|
|
|
2009-09-16 17:52:54 +00:00
|
|
|
# Fix some wrong hardcoded paths
|
2009-09-16 17:08:33 +00:00
|
|
|
preConfigure = ''
|
2015-10-05 18:32:54 +00: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 17:08:33 +00:00
|
|
|
sed -i -e "s|/bin/ln|ln|" src/Makefile.in
|
2015-10-05 18:32:54 +00:00
|
|
|
sed -i -e "s|-ltermcap|-lncurses|" ./configure
|
2009-09-16 17:08:33 +00:00
|
|
|
'';
|
2018-05-10 05:25:31 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-png=${libpng.dev}"
|
|
|
|
"--with-z=${zlib.dev}"
|
|
|
|
"--with-pcre=${pcre.dev}"
|
|
|
|
"--with-readline=${readline.dev}"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pcre libpng zlib readline
|
|
|
|
] ++ stdenv.lib.optionals (stdenv.isDarwin) [ libiconv ];
|
|
|
|
|
2015-10-06 09:52:25 +00:00
|
|
|
propagatedBuildInputs = [ ncurses ];
|
|
|
|
|
2018-05-10 05:25:31 +00:00
|
|
|
# slang 2.3.2 does not support parallel building
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2015-10-06 09:52:25 +00:00
|
|
|
postInstall = ''
|
|
|
|
find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
|
|
|
|
sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
|
|
|
|
'';
|
2014-09-21 18:26:28 +00:00
|
|
|
|
2015-10-06 09:52:25 +00:00
|
|
|
meta = with stdenv.lib; {
|
2014-09-21 18:26:28 +00:00
|
|
|
description = "A multi-platform programmer's library designed to allow a developer to create robust software";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.jedsoft.org/slang/";
|
2015-10-06 09:52:25 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-12-05 07:29:48 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2015-10-06 09:52:25 +00:00
|
|
|
platforms = platforms.unix;
|
2014-09-21 18:26:28 +00:00
|
|
|
};
|
2005-12-25 14:02:09 +00:00
|
|
|
}
|