numatop: 2.1 -> 2.2, fix build errors from format strings

Also grab CK's PR for other string operation fixups.

+21 -6
+21 -6
pkgs/os-specific/linux/numatop/default.nix
··· 1 - { lib, stdenv, fetchurl, pkg-config, numactl, ncurses, check }: 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, numactl, ncurses, check }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "numatop"; 5 - version = "2.1"; 6 - src = fetchurl { 7 - url = "https://github.com/intel/${pname}/releases/download/v${version}/${pname}-v${version}.tar.xz"; 8 - sha256 = "1s7psq1xyswj0lpx10zg5lnppav2xy9safkfx3rssrs9c2fp5d76"; 5 + version = "2.2"; 6 + src = fetchFromGitHub { 7 + owner = "intel"; 8 + repo = "numatop"; 9 + rev = "v${version}"; 10 + sha256 = "sha256-GJvTwqgx34ZW10eIJj/xiKe3ZkAfs7GlJImz8jrnjfI="; 9 11 }; 10 12 11 - nativeBuildInputs = [ pkg-config ]; 13 + nativeBuildInputs = [ autoreconfHook pkg-config ]; 12 14 buildInputs = [ numactl ncurses ]; 13 15 checkInputs = [ check ]; 16 + 17 + patches = [ 18 + (fetchpatch { 19 + url = "https://github.com/intel/numatop/pull/54.patch"; 20 + sha256 = "sha256-TbMLv7TT9T8wE4uJ1a/AroyPPwrwL0eX5IBLsh9GTTM="; 21 + name = "fix-string-operations.patch"; 22 + }) 23 + (fetchpatch { 24 + url = "https://github.com/intel/numatop/pull/64.patch"; 25 + sha256 = "sha256-IevbSFJRTS5iQ5apHOVXzF67f3LJaW6j7DySFmVuyiM="; 26 + name = "fix-format-strings-mvwprintw.patch"; 27 + }) 28 + ]; 14 29 15 30 doCheck = true; 16 31