about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2022-11-18 02:47:27 +0100
committerGitHub <noreply@github.com>2022-11-18 02:47:27 +0100
commit5271b56941c115f1daaddf4b71c42bbbd550d32b (patch)
tree1a6237204c9679edc078590c51f40013bd5b30b3 /pkgs/tools
parentc3e81d966284e61f4b327c56fb051c0ca417672b (diff)
parentb7691ef2d35e104c69f47200eeae44996fdb2ce5 (diff)
Merge pull request #201171 from fpletz/pkg/ipmitool-1.8.19
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/system/ipmitool/default.nix58
1 files changed, 14 insertions, 44 deletions
diff --git a/pkgs/tools/system/ipmitool/default.nix b/pkgs/tools/system/ipmitool/default.nix
index 6020f1658e6a7..9293951d74681 100644
--- a/pkgs/tools/system/ipmitool/default.nix
+++ b/pkgs/tools/system/ipmitool/default.nix
@@ -1,58 +1,28 @@
-{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? stdenv.hostPlatform.isStatic }:
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, openssl, readline }:
 
 stdenv.mkDerivation rec {
   pname = "ipmitool";
-  version = "1.8.18";
+  version = "1.8.19";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m";
+  src = fetchFromGitHub {
+    owner = pname;
+    repo = pname;
+    rev = "IPMITOOL_${lib.replaceStrings ["."] ["_"] version}";
+    hash = "sha256-VVYvuldRIHhaIUibed9cLX8Avfy760fdBLNO8MoUKCk=";
   };
 
-  patches = [
-    (fetchpatch {
-      url = "https://sources.debian.org/data/main/i/ipmitool/1.8.18-6/debian/patches/0120-openssl1.1.patch";
-      sha256 = "1xvsjxb782lzy72bnqqnsk3r5h4zl3na95s4pqn2qg7cic2mnbfk";
-    })
-    # Fix build on non-linux systems
-    (fetchpatch {
-      url = "https://github.com/ipmitool/ipmitool/commit/5db314f694f75c575cd7c9ffe9ee57aaf3a88866.patch";
-      sha256 = "01niwrgajhrdhl441gzmw6v1r1yc3i8kn98db4b6smfn5fwdp1pa";
-    })
-    (fetchpatch {
-      name = "CVE-2020-5208.patch";
-      url = "https://github.com/ipmitool/ipmitool/commit/e824c23316ae50beb7f7488f2055ac65e8b341f2.patch";
-      sha256 = "sha256-X7MnoX2fzByRpRY4p33xetT+V2aehlQ/qU+aeaqtTUY=";
-    })
-    # Pull upstream patch to support upstream gcc-10:
-    #   https://github.com/ipmitool/ipmitool/pull/180
-    (fetchpatch {
-      name = "fno-common.patch";
-      url = "https://github.com/ipmitool/ipmitool/commit/51c7e0822f531469cf860dfa5d010c87b284b747.patch";
-      sha256 = "sha256-5UszUdVw3s2S5RCm5Exq4mqDqiYcN62in1O5+TZu9YA=";
-    })
-  ];
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ openssl readline ];
 
-  buildInputs = [ openssl ];
-
-  configureFlags = [
-    "--infodir=${placeholder "out"}/share/info"
-    "--mandir=${placeholder "out"}/share/man"
-  ] ++ lib.optionals static [
-    "LDFLAGS=-static"
-    "--enable-static"
-    "--disable-shared"
-  ] ++ lib.optionals (!static) [
-    "--enable-shared"
-  ];
-
-  makeFlags = lib.optional static "AM_LDFLAGS=-all-static";
-  dontDisableStatic = static;
+  postPatch = ''
+    substituteInPlace configure.ac \
+      --replace 'AC_MSG_WARN([** Neither wget nor curl could be found.])' 'AM_CONDITIONAL([DOWNLOAD], [false])'
+  '';
 
   meta = with lib; {
     description = "Command-line interface to IPMI-enabled devices";
     license = licenses.bsd3;
-    homepage = "https://sourceforge.net/projects/ipmitool/";
+    homepage = "https://github.com/ipmitool/ipmitool";
     platforms = platforms.unix;
     maintainers = with maintainers; [ fpletz ];
   };