1 {lib, stdenv, fetchurl, pkg-config, glib, ncurses, gpm}:
2 stdenv.mkDerivation rec {
7 url = "mirror://sourceforge/libviper/libviper-${version}.tar.gz";
8 sha256 = "1jvm7wdgw6ixyhl0pcfr9lnr9g6sg6whyrs9ihjiz0agvqrgvxwc";
12 sed -i -e s@/usr/local@$out@ -e /ldconfig/d -e '/cd vdk/d' Makefile
14 # Fix pending upstream inclusion for ncurses-6.3 support:
15 # https://github.com/TragicWarrior/libviper/pull/16
16 # Not applied as it due to unrelated code changes in context.
17 substituteInPlace viper_msgbox.c --replace \
18 'mvwprintw(window,height-3,tmp,prompt);' \
19 'mvwprintw(window,height-3,tmp,"%s",prompt);'
20 substituteInPlace w_decorate.c --replace \
21 'mvwprintw(window,0,x,title);' \
22 'mvwprintw(window,0,x,"%s",title);'
30 nativeBuildInputs = [ pkg-config ];
31 buildInputs = [ glib ncurses gpm];
34 homepage = "http://libviper.sourceforge.net/";
35 description = "Simple window creation and management facilities for the console";
36 license = licenses.gpl2Plus;
37 platforms = platforms.linux;