linuxPackages.hyperv-daemons: Fix aarch64 builds on latest kernel (#371583)
[NixPkgs.git] / pkgs / by-name / nv / nvi / package.nix
blobd8c3fe35c95ffedbaee63ee9be98594ac1287c4e
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch,
6   ncurses,
7   db,
8 }:
10 stdenv.mkDerivation rec {
11   pname = "nvi";
12   version = "1.81.6";
14   src = fetchurl {
15     url = "https://deb.debian.org/debian/pool/main/n/nvi/nvi_${version}.orig.tar.gz";
16     sha256 = "13cp9iz017bk6ryi05jn7drbv7a5dyr201zqd3r4r8srj644ihwb";
17   };
19   patches = [
20     # Fix runtime error with modern versions of db.
21     (fetchpatch {
22       url = "https://src.fedoraproject.org/rpms/nvi/raw/f33/f/nvi-03-db4.patch";
23       sha256 = "1vpnly3dcldwl8gwl0jrh5yh0vhgbdhsh6xn7lnwhrawlvk6d55y";
24     })
26     # Fix build with Glibc.
27     (fetchpatch {
28       url = "https://src.fedoraproject.org/rpms/nvi/raw/f33/f/nvi-20-glibc_has_grantpt.patch";
29       sha256 = "1ypqj263wh53m5rgiag5c4gy1rksj2waginny1lcj34n72p2dsml";
30     })
31   ];
33   buildInputs = [
34     ncurses
35     db
36   ];
38   preConfigure = ''
39     cd build.unix
40   '';
41   configureScript = "../dist/configure";
42   configureFlags = [ "vi_cv_path_preserve=/tmp" ];
44   meta = with lib; {
45     description = "Berkeley Vi Editor";
46     license = licenses.free;
47     platforms = platforms.unix;
48     broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/nvi.x86_64-darwin
49   };