about summary refs log tree commit diff
path: root/pkgs/tools/system/ipmitool/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system/ipmitool/default.nix')
-rw-r--r--pkgs/tools/system/ipmitool/default.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/tools/system/ipmitool/default.nix b/pkgs/tools/system/ipmitool/default.nix
index e86dc14b0201..75bfd7126613 100644
--- a/pkgs/tools/system/ipmitool/default.nix
+++ b/pkgs/tools/system/ipmitool/default.nix
@@ -19,19 +19,19 @@ stdenv.mkDerivation {
     })
   ];
 
-  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
-    substituteInPlace src/plugins/ipmi_intf.c --replace "s6_addr16" "s6_addr"
-  '';
-
   buildInputs = [ openssl ];
 
-  preConfigure = ''
-    configureFlagsArray=(
-      --infodir=$out/share/info
-      --mandir=$out/share/man
-      ${if static then "LDFLAGS=-static --enable-static --disable-shared" else "--enable-shared"}
-    )
-  '';
+  configureFlags = [
+    "--infodir=${placeholder "out"}/share/info"
+    "--mandir=${placeholder "out"}/share/man"
+  ] ++ stdenv.lib.optionals static [
+    "LDFLAGS=-static"
+    "--enable-static"
+    "--disable-shared"
+  ] ++ stdenv.lib.optionals (!static) [
+    "--enable-shared"
+  ];
+
   makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static";
   dontDisableStatic = static;