nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, autoreconfHook
3, fetchFromGitHub
4, fetchpatch
5, gettext
6, ncurses
7, readline
8, stdenv
9, texinfo
10}:
11
12stdenv.mkDerivation rec {
13 pname = "pinfo";
14 version = "0.6.13";
15
16 src = fetchFromGitHub {
17 owner = "baszoetekouw";
18 repo = pname;
19 rev = "v${version}";
20 sha256 = "173d2p22irwiabvr4z6qvr6zpr6ysfkhmadjlyhyiwd7z62larvy";
21 };
22
23 patches = [
24 # Pull upstream fix for -fno-common toolchains
25 (fetchpatch {
26 name = "fno-common.patch";
27 url = "https://github.com/baszoetekouw/pinfo/commit/16dba5978146b6d3a540ac7c8f415eda49280847.patch";
28 sha256 = "148fm32chvq8x9ayq9cnhgszh10g5v0cv0xph67fa7sp341p09wy";
29 })
30
31 # Fix pending upstream inclusion for build on ncurses-6.3:
32 # https://github.com/baszoetekouw/pinfo/pull/27
33 (fetchpatch {
34 name = "ncurses-6.3.patch";
35 url = "https://github.com/baszoetekouw/pinfo/commit/fc67ceacd81f0c74fcab85447c23a532ae482827.patch";
36 sha256 = "08phmng8vgfqjjazys05acpd5gh110malhw3sx29dg86nsrg2khs";
37 })
38
39 # Fix pending upstream inclusion for build on gcc-11:
40 # https://github.com/baszoetekouw/pinfo/pull/27
41 (fetchpatch {
42 name = "gcc-11.patch";
43 url = "https://github.com/baszoetekouw/pinfo/commit/ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa.patch";
44 sha256 = "09g8msgan2x48hxcbm7l6j3av6n8i0bsd4g0vf5xd8bxwzynb13m";
45 })
46 ];
47
48 nativeBuildInputs = [
49 autoreconfHook
50 ];
51
52 buildInputs = [
53 gettext
54 texinfo
55 ncurses
56 readline
57 ];
58
59 configureFlags = [
60 "--with-curses=${ncurses.dev}"
61 "--with-readline=${readline.dev}"
62 ];
63
64 meta = with lib; {
65 description = "A viewer for info files";
66 homepage = "https://github.com/baszoetekouw/pinfo";
67 license = licenses.gpl2Plus;
68 platforms = platforms.unix;
69 maintainers = with maintainers; [ fab ];
70 };
71}