summary refs log tree commit diff
path: root/pkgs/os-specific/linux/numatop
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2022-01-31 12:53:54 -0600
committerWill Dietz <w@wdtz.org>2022-01-31 12:53:54 -0600
commit8673391cb791bd6d7a6ce26dd8472012f1037446 (patch)
treee8fb956d3394219268e8def0a155943fea18dd3b /pkgs/os-specific/linux/numatop
parentbea399e226f856d057f931fa0d89566aa303c652 (diff)
downloadnixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.tar
nixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.tar.gz
nixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.tar.bz2
nixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.tar.lz
nixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.tar.xz
nixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.tar.zst
nixpkgs-8673391cb791bd6d7a6ce26dd8472012f1037446.zip
numatop: 2.1 -> 2.2, fix build errors from format strings
Also grab CK's PR for other string operation fixups.
Diffstat (limited to 'pkgs/os-specific/linux/numatop')
-rw-r--r--pkgs/os-specific/linux/numatop/default.nix27
1 files changed, 21 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/numatop/default.nix b/pkgs/os-specific/linux/numatop/default.nix
index 8191439dedf..0946d5050db 100644
--- a/pkgs/os-specific/linux/numatop/default.nix
+++ b/pkgs/os-specific/linux/numatop/default.nix
@@ -1,17 +1,32 @@
-{ lib, stdenv, fetchurl, pkg-config, numactl, ncurses, check }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, numactl, ncurses, check }:
 
 stdenv.mkDerivation rec {
   pname = "numatop";
-  version = "2.1";
-  src = fetchurl {
-    url = "https://github.com/intel/${pname}/releases/download/v${version}/${pname}-v${version}.tar.xz";
-    sha256 = "1s7psq1xyswj0lpx10zg5lnppav2xy9safkfx3rssrs9c2fp5d76";
+  version = "2.2";
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "numatop";
+    rev = "v${version}";
+    sha256 = "sha256-GJvTwqgx34ZW10eIJj/xiKe3ZkAfs7GlJImz8jrnjfI=";
   };
 
-  nativeBuildInputs = [ pkg-config ];
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
   buildInputs = [ numactl ncurses ];
   checkInputs = [ check ];
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/intel/numatop/pull/54.patch";
+      sha256 = "sha256-TbMLv7TT9T8wE4uJ1a/AroyPPwrwL0eX5IBLsh9GTTM=";
+      name = "fix-string-operations.patch";
+    })
+    (fetchpatch {
+      url = "https://github.com/intel/numatop/pull/64.patch";
+      sha256 = "sha256-IevbSFJRTS5iQ5apHOVXzF67f3LJaW6j7DySFmVuyiM=";
+      name = "fix-format-strings-mvwprintw.patch";
+    })
+  ];
+
   doCheck  = true;
 
   meta = with lib; {