1{
2 lib,
3 stdenv,
4 fetchurl,
5 fetchpatch,
6 ncurses,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "bviplus";
11 version = "1.0";
12
13 src = fetchurl {
14 url = "mirror://sourceforge/project/bviplus/bviplus/${finalAttrs.version}/bviplus-${finalAttrs.version}.tgz";
15 hash = "sha256-LyukklCYy5U3foabc2hB7ZHbJdrDXlyuXkvlGH1zAiM=";
16 };
17
18 patches = [
19 # Fix pending upstream inclusion for ncurses-6.3 support:
20 # https://sourceforge.net/p/bviplus/bugs/7/
21 (fetchpatch {
22 name = "ncurses-6.3.patch";
23 url = "https://sourceforge.net/p/bviplus/bugs/7/attachment/bviplus-ncurses-6.2.patch";
24 hash = "sha256-3ZC7pPew40quekb5JecPQg2gRFi0DXeMjxQPT5sTerw=";
25 # svn patch, rely on prefix added by fetchpatch:
26 extraPrefix = "";
27 })
28 ];
29
30 buildInputs = [ ncurses ];
31
32 makeFlags = [ "PREFIX=$(out)" ];
33
34 env.NIX_CFLAGS_COMPILE = "-Wno-implicit-int -fgnu89-inline";
35
36 meta = {
37 description = "Ncurses based hex editor with a vim-like interface";
38 homepage = "https://bviplus.sourceforge.net";
39 license = lib.licenses.gpl3;
40 platforms = lib.platforms.linux;
41 maintainers = [ ];
42 mainProgram = "bviplus";
43 };
44})