git.iko.soy/typeable/nixpkgs
on master help sign in
pinfo: fix build for ncurses-6.3

Otherwise on upcoming ncurses-6.3 the build fails as: video.c:114:26: error: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Werror=format=] 114 | printw(_("Viewing line %d/%d, 100%%"), lines, lines); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ While at it pull upstream fix for -fcommon toolchains (vanilla gcc-10) and pending fix for gcc-11.

commit50edfafdbfa12e7948ed2cfada23c3b85037e56c authorSergei Trofimovich <slyich@gmail.com> dateThu 11 Nov 2021, 19:09 (5 years ago) parent52c1e64
1 file changed+26
pkgs/applications/misc/pinfo/default.nix+26
pkgs/applications/misc/pinfo/default.nix+26
@@ -1,6 +1,7 @@
11{ lib
22, autoreconfHook
33, fetchFromGitHub
4+, fetchpatch
45, gettext
56, ncurses
67, readline
@@ -19,6 +20,31 @@ stdenv.mkDerivation rec {
1920 sha256 = "173d2p22irwiabvr4z6qvr6zpr6ysfkhmadjlyhyiwd7z62larvy";
2021 };
2122
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+
2248 nativeBuildInputs = [
2349 autoreconfHook
2450 ];