Unverified Commit eb1a53ae authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

freeipmi: enable for darwin; nut: enable for darwin (#483240)

parents a2592bec e279d4af
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  fetchurl,
  lib,
  stdenv,
  argp-standalone,
  libgcrypt,
  readline,
  libgpg-error,
@@ -17,12 +18,22 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-W872u562gOSbSjYjV5kwrOeJn1OSWyBF/p+RrWkEER0=";
  };

  postPatch = lib.optionalString stdenv.cc.isClang ''
    substituteInPlace man/Makefile.in \
      --replace-fail \
        '$(CPP_FOR_BUILD) -nostdinc -w -C -P -I. -I$(top_srcdir)/man $@.pre $@' \
        '$(CPP_FOR_BUILD) -nostdinc -w -C -P -I. -I$(top_srcdir)/man -o $@ $@.pre'
  '';

  depsBuildBuild = [ buildPackages.stdenv.cc ];

  buildInputs = [
    libgcrypt
    readline
    libgpg-error
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    argp-standalone
  ];

  configureFlags = [
@@ -63,6 +74,6 @@ stdenv.mkDerivation rec {
    license = lib.licenses.gpl3Plus;

    maintainers = with lib.maintainers; [ raskin ];
    platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
    platforms = lib.platforms.gnu ++ lib.platforms.unix;
  };
}
+13 −11
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
    (replaceVars ./hardcode-paths.patch {
      avahi = "${avahi}/lib";
      freeipmi = "${freeipmi}/lib";
      libgpiod = "${libgpiod_1}/lib";
      libgpiod = if stdenv.hostPlatform.isLinux then "${libgpiod_1}/lib" else "/homeless-shelter";
      libusb = "${libusb1}/lib";
      neon = "${neon}/lib";
      libmodbus = "${modbus}/lib";
@@ -76,18 +76,20 @@ stdenv.mkDerivation rec {
  ];

  buildInputs = [
    neon
    libusb1
    openssl
    udev
    avahi
    freeipmi
    libgpiod_1
    libtool
    i2c-tools
    net-snmp
    gd
    libtool
    libusb1
    modbus
    neon
    net-snmp
    openssl
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [
    i2c-tools
    libgpiod_1
    udev
  ];

  nativeBuildInputs = [
@@ -129,7 +131,7 @@ stdenv.mkDerivation rec {
    "sbin"
  ];

  postInstall = ''
  postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
    substituteInPlace $out/lib/systemd/system-shutdown/nutshutdown \
      --replace /bin/sed "${gnused}/bin/sed" \
      --replace /bin/sleep "${coreutils}/bin/sleep" \
@@ -155,7 +157,7 @@ stdenv.mkDerivation rec {
      It uses a layered approach to connect all of the parts.
    '';
    homepage = "https://networkupstools.org/";
    platforms = lib.platforms.linux;
    platforms = lib.platforms.unix;
    maintainers = [ lib.maintainers.pierron ];
    license = with lib.licenses; [
      gpl1Plus