|
|
|
@@ -1,15 +1,13 @@
|
|
|
|
|
{ lib, stdenv, fetchurl, pkg-config
|
|
|
|
|
|
|
|
|
|
, abiVersion ? "6"
|
|
|
|
|
, mouseSupport ? false
|
|
|
|
|
, unicode ? true
|
|
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
|
, enableShared ? !enableStatic
|
|
|
|
|
, withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt
|
|
|
|
|
|
|
|
|
|
, gpm
|
|
|
|
|
|
|
|
|
|
{ lib
|
|
|
|
|
, stdenv
|
|
|
|
|
, fetchurl
|
|
|
|
|
, buildPackages
|
|
|
|
|
, pkg-config
|
|
|
|
|
, abiVersion ? "6"
|
|
|
|
|
, enableStatic ? stdenv.hostPlatform.isStatic
|
|
|
|
|
, withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt
|
|
|
|
|
, mouseSupport ? false, gpm
|
|
|
|
|
, unicodeSupport ? true
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
@@ -31,13 +29,13 @@ stdenv.mkDerivation rec {
|
|
|
|
|
setOutputFlags = false; # some aren't supported
|
|
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
|
(lib.withFeature enableShared "shared")
|
|
|
|
|
(lib.withFeature (!enableStatic) "shared")
|
|
|
|
|
"--without-debug"
|
|
|
|
|
"--enable-pc-files"
|
|
|
|
|
"--enable-symlinks"
|
|
|
|
|
"--with-manpage-format=normal"
|
|
|
|
|
"--disable-stripping"
|
|
|
|
|
] ++ lib.optional unicode "--enable-widec"
|
|
|
|
|
] ++ lib.optional unicodeSupport "--enable-widec"
|
|
|
|
|
++ lib.optional (!withCxx) "--without-cxx"
|
|
|
|
|
++ lib.optional (abiVersion == "5") "--with-abi-version=5"
|
|
|
|
|
++ lib.optional stdenv.hostPlatform.isNetBSD "--enable-rpath"
|
|
|
|
@@ -49,12 +47,16 @@ stdenv.mkDerivation rec {
|
|
|
|
|
# Only the C compiler, and explicitly not C++ compiler needs this flag on solaris:
|
|
|
|
|
CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED";
|
|
|
|
|
|
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
|
depsBuildBuild = [
|
|
|
|
|
buildPackages.stdenv.cc
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
pkg-config
|
|
|
|
|
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
|
|
|
|
buildPackages.ncurses
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
|
|
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
@@ -147,31 +149,26 @@ stdenv.mkDerivation rec {
|
|
|
|
|
rm "$out"/lib/*.a
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "Free software emulation of curses in SVR4 and more";
|
|
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
|
The Ncurses (new curses) library is a free software emulation of
|
|
|
|
|
curses in System V Release 4.0, and more. It uses Terminfo
|
|
|
|
|
format, supports pads and color and multiple highlights and
|
|
|
|
|
forms characters and function-key mapping, and has all the other
|
|
|
|
|
SYSV-curses enhancements over BSD Curses.
|
|
|
|
|
|
|
|
|
|
The ncurses code was developed under GNU/Linux. It has been in
|
|
|
|
|
use for some time with OpenBSD as the system curses library, and
|
|
|
|
|
on FreeBSD and NetBSD as an external package. It should port
|
|
|
|
|
easily to any ANSI/POSIX-conforming UNIX. It has even been
|
|
|
|
|
ported to OS/2 Warp!
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
|
homepage = "https://www.gnu.org/software/ncurses/";
|
|
|
|
|
description = "Free software emulation of curses in SVR4 and more";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
The Ncurses (new curses) library is a free software emulation of curses in
|
|
|
|
|
System V Release 4.0, and more. It uses Terminfo format, supports pads and
|
|
|
|
|
color and multiple highlights and forms characters and function-key
|
|
|
|
|
mapping, and has all the other SYSV-curses enhancements over BSD Curses.
|
|
|
|
|
|
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
|
The ncurses code was developed under GNU/Linux. It has been in use for
|
|
|
|
|
some time with OpenBSD as the system curses library, and on FreeBSD and
|
|
|
|
|
NetBSD as an external package. It should port easily to any
|
|
|
|
|
ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!
|
|
|
|
|
'';
|
|
|
|
|
license = licenses.mit;
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
|
ldflags = "-lncurses";
|
|
|
|
|
inherit unicode abiVersion;
|
|
|
|
|
inherit unicodeSupport abiVersion;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|