nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchgit,
5 autoreconfHook,
6 pkg-config,
7 ncurses,
8 readline,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "abook";
13 version = "0.6.2";
14
15 src = fetchgit {
16 url = "https://git.code.sf.net/p/abook/git";
17 rev = "ver_${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
18 hash = "sha256-aV57Ob6KN6/eNPrxxmNOy/qfhG687uVy5WY0cd4daCU=";
19 };
20
21 patches = [
22 ./0001-Fix-wcwidth-declaration.patch
23 ];
24
25 # error: implicit declaration of function 'isalnum' [-Wimplicit-function-declaration]
26 # if (isalnum (*str)) *(p++) = *str;
27 postPatch = ''
28 substituteInPlace database.c \
29 --replace-fail '#include "xmalloc.h"' $'#include "xmalloc.h"\n#include <ctype.h>'
30 '';
31
32 nativeBuildInputs = [
33 autoreconfHook
34 pkg-config
35 ];
36
37 buildInputs = [
38 ncurses
39 readline
40 ];
41
42 meta = {
43 homepage = "http://abook.sourceforge.net/";
44 description = "Text-based addressbook program designed to use with mutt mail client";
45 license = lib.licenses.gpl3Only;
46 platforms = lib.platforms.unix;
47 mainProgram = "abook";
48 };
49})