nixpkgs/pkgs/development/libraries/slang/default.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline, libiconv }:
2014-09-21 19:26:28 +01:00
stdenv.mkDerivation rec {
2018-05-10 06:25:31 +01:00
name = "slang-2.3.2";
src = fetchurl {
url = "https://www.jedsoft.org/releases/slang/${name}.tar.bz2";
2018-05-10 06:25:31 +01:00
sha256 = "06p379fqn6w38rdpqi98irxi2bf4llb0rja3dlgkqz7nqh7kp7pw";
};
2014-09-22 19:17:33 +01:00
outputs = [ "out" "dev" "man" "doc" ];
2018-11-24 00:00:46 +00:00
patches = [ ./terminfo-dirs.patch ];
# Fix some wrong hardcoded paths
preConfigure = ''
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
sed -i -e "s|/bin/ln|ln|" src/Makefile.in
sed -i -e "s|-ltermcap|-lncurses|" ./configure
'';
2018-05-10 06:25:31 +01: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 ];
propagatedBuildInputs = [ ncurses ];
2018-05-10 06:25:31 +01:00
# slang 2.3.2 does not support parallel building
enableParallelBuilding = false;
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
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/;
license = licenses.gpl2Plus;
2018-05-10 06:25:31 +01:00
maintainers = with maintainers; [ fuuzetsu ];
platforms = platforms.unix;
2014-09-21 19:26:28 +01:00
};
}