2021-01-21 17:00:13 +00:00
|
|
|
{lib, stdenv, fetchurl, pkg-config, glib, ncurses, gpm}:
|
2009-11-04 22:38:26 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-11-09 21:14:04 +00:00
|
|
|
pname = "libviper";
|
|
|
|
version = "1.4.6";
|
2009-04-22 21:33:24 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-09 21:14:04 +00:00
|
|
|
url = "mirror://sourceforge/libviper/libviper-${version}.tar.gz";
|
2013-12-13 20:46:34 +00:00
|
|
|
sha256 = "1jvm7wdgw6ixyhl0pcfr9lnr9g6sg6whyrs9ihjiz0agvqrgvxwc";
|
2009-04-22 21:33:24 +00:00
|
|
|
};
|
|
|
|
|
2021-11-28 16:14:46 +00:00
|
|
|
postPatch = ''
|
2009-04-22 21:33:24 +00:00
|
|
|
sed -i -e s@/usr/local@$out@ -e /ldconfig/d -e '/cd vdk/d' Makefile
|
2021-11-28 16:14:46 +00:00
|
|
|
|
|
|
|
# Fix pending upstream inclusion for ncurses-6.3 support:
|
|
|
|
# https://github.com/TragicWarrior/libviper/pull/16
|
|
|
|
# Not applied as it due to unrelated code changes in context.
|
|
|
|
substituteInPlace viper_msgbox.c --replace \
|
|
|
|
'mvwprintw(window,height-3,tmp,prompt);' \
|
|
|
|
'mvwprintw(window,height-3,tmp,"%s",prompt);'
|
|
|
|
substituteInPlace w_decorate.c --replace \
|
|
|
|
'mvwprintw(window,0,x,title);' \
|
|
|
|
'mvwprintw(window,0,x,"%s",title);'
|
2009-04-22 21:33:24 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/include
|
|
|
|
mkdir -p $out/lib
|
2009-04-22 21:33:24 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-09-05 21:26:13 +00:00
|
|
|
buildInputs = [ glib ncurses gpm];
|
2009-04-22 21:33:24 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://libviper.sourceforge.net/";
|
2009-04-22 21:33:24 +00:00
|
|
|
description = "Simple window creation and management facilities for the console";
|
2015-05-28 17:20:29 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = platforms.linux;
|
2009-04-22 21:33:24 +00:00
|
|
|
};
|
|
|
|
}
|