mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{lib, stdenv, fetchurl, pkg-config, glib, ncurses, gpm}:
|
|
stdenv.mkDerivation rec {
|
|
pname = "libviper";
|
|
version = "1.4.6";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/libviper/libviper-${version}.tar.gz";
|
|
sha256 = "1jvm7wdgw6ixyhl0pcfr9lnr9g6sg6whyrs9ihjiz0agvqrgvxwc";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i -e s@/usr/local@$out@ -e /ldconfig/d -e '/cd vdk/d' Makefile
|
|
|
|
# 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);'
|
|
'';
|
|
|
|
preInstall = ''
|
|
mkdir -p $out/include
|
|
mkdir -p $out/lib
|
|
'';
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ glib ncurses gpm];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://libviper.sourceforge.net/";
|
|
description = "Simple window creation and management facilities for the console";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|