1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-23 18:37:02 +00:00
nixpkgs/pkgs/development/libraries/slang/default.nix
Tuomas Tynkkynen 1ff422aa23 treewide: Add man & info outputs where necessary (instead of doc)
Because man & info pages won't be going to $doc after the next commit.
Scripted change for the files having one-package-per-file.
2017-08-11 21:32:54 +03:00

36 lines
1.3 KiB
Nix

{ stdenv, fetchurl, ncurses, pcre, libpng, zlib, readline, libiconv }:
stdenv.mkDerivation rec {
name = "slang-2.3.1a";
src = fetchurl {
url = "http://www.jedsoft.org/releases/slang/${name}.tar.bz2";
sha256 = "0dlcy0hn0j6cj9qj5x6hpb0axifnvzzmv5jqq0wq14fygw0c7w2l";
};
outputs = [ "out" "dev" "man" "doc" ];
# 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
'';
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 ];
postInstall = ''
find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
'';
meta = with stdenv.lib; {
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;
platforms = platforms.unix;
maintainers = [ maintainers.fuuzetsu ];
};
}