summary refs log tree commit diff
diff options
context:
space:
mode:
authormarkuskowa <markus.kowalewski@gmail.com>2022-01-31 23:19:43 +0100
committerGitHub <noreply@github.com>2022-01-31 23:19:43 +0100
commitddc93d61c0dd1418aeddff7686da1d2ba0bc5db5 (patch)
treeb92927c249424bbbb07183c73752babe2d4cd8d7
parent67cc0b103ab45ca2babb97d96e26d50dd0061644 (diff)
parent8673391cb791bd6d7a6ce26dd8472012f1037446 (diff)
downloadnixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.tar
nixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.tar.gz
nixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.tar.bz2
nixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.tar.lz
nixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.tar.xz
nixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.tar.zst
nixpkgs-ddc93d61c0dd1418aeddff7686da1d2ba0bc5db5.zip
Merge pull request #157567 from dtzWill/update/numatop-2.2-fix-platforms
numatop: 2.1 -> 2.2, fix build, string ops, meta.platforms
-rw-r--r--pkgs/os-specific/linux/numatop/default.nix31
1 files changed, 23 insertions, 8 deletions
diff --git a/pkgs/os-specific/linux/numatop/default.nix b/pkgs/os-specific/linux/numatop/default.nix
index ba972bb6916..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; {
@@ -20,8 +35,8 @@ stdenv.mkDerivation rec {
     license = licenses.bsd3;
     maintainers = with maintainers; [ dtzWill ];
     platforms = [
-      { kernel.name = "linux"; cpu.family = "x86"; }
-      { kernel.name = "linux"; cpu.family = "power"; }
+      "i686-linux" "x86_64-linux"
+      "powerpc64-linux" "powerpc64le-linux"
     ];
   };
 }