slang: fix some dependants and split into outputs

These termcap and similar (nonexistent) libraries are baffling me.
This commit is contained in:
Vladimír Čunát 2015-10-06 11:52:25 +02:00
parent 0338199544
commit b9031ea1da
2 changed files with 19 additions and 9 deletions

View File

@ -14,16 +14,18 @@ stdenv.mkDerivation rec {
buildInputs = [ slang popt ]; buildInputs = [ slang popt ];
NIX_LDFLAGS = "-lncurses";
crossAttrs = { crossAttrs = {
makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-"; makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-";
}; };
meta = { meta = with stdenv.lib; {
homepage = https://fedorahosted.org/newt/; homepage = https://fedorahosted.org/newt/;
description = "Library for color text mode, widget based user interfaces"; description = "Library for color text mode, widget based user interfaces";
license = stdenv.lib.licenses.lgpl2; license = licenses.lgpl2;
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
maintainers = [ stdenv.lib.maintainers.viric ]; maintainers = [ maintainers.viric ];
}; };
} }

View File

@ -7,6 +7,8 @@ stdenv.mkDerivation rec {
sha256 = "0aqd2cjabj6nhd4r3dc4vhqif2bf3dmqnrn2gj0xm4gqyfd177jy"; sha256 = "0aqd2cjabj6nhd4r3dc4vhqif2bf3dmqnrn2gj0xm4gqyfd177jy";
}; };
outputs = [ "dev" "out" "doc" ];
# Fix some wrong hardcoded paths # Fix some wrong hardcoded paths
preConfigure = '' preConfigure = ''
sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure sed -i -e "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure
@ -15,13 +17,19 @@ stdenv.mkDerivation rec {
sed -i -e "s|-ltermcap|-lncurses|" ./configure sed -i -e "s|-ltermcap|-lncurses|" ./configure
''; '';
configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}"; configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}";
buildInputs = [ncurses pcre libpng zlib readline]; buildInputs = [ pcre libpng zlib readline ];
propagatedBuildInputs = [ ncurses ];
meta = { 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"; description = "A multi-platform programmer's library designed to allow a developer to create robust software";
homepage = http://www.jedsoft.org/slang/; homepage = http://www.jedsoft.org/slang/;
license = stdenv.lib.licenses.gpl2Plus; license = licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; maintainers = [ maintainers.fuuzetsu ];
}; };
} }