Unverified Commit 0e7ade7a authored by Atemu's avatar Atemu Committed by GitHub
Browse files

Merge pull request #230794 from jiegec/flashrom-darwin

flashrom: unbreak darwin
parents 872987d0 2015ab2d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -27,13 +27,15 @@ stdenv.mkDerivation rec {

  buildInputs = [
    libftdi1
    libgpiod
    libjaylink
    libusb1
  ] ++ lib.optionals (!stdenv.isDarwin) [
    libgpiod
    pciutils
  ];

  makeFlags = [ "PREFIX=$(out)" "libinstall" ];
  makeFlags = [ "PREFIX=$(out)" "libinstall" ] ++ lib.optionals stdenv.isDarwin [ "CONFIG_ENABLE_LIBPCI_PROGRAMMERS=no" ]
    ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "CONFIG_INTERNAL_X86=no" "CONFIG_INTERNAL_DMI=no" "CONFIG_RAYER_SPI=0" ];

  meta = with lib; {
    homepage = "https://www.flashrom.org";
@@ -41,6 +43,5 @@ stdenv.mkDerivation rec {
    license = with licenses; [ gpl2 gpl2Plus ];
    maintainers = with maintainers; [ felixsinger ];
    platforms = platforms.all;
    broken = stdenv.isDarwin; # requires DirectHW
  };
}
+4 −3
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
  };

  nativeBuildInputs = [ pkg-config installShellFiles ];
  buildInputs = [ libftdi1 libusb1 pciutils ]
  buildInputs = [ libftdi1 libusb1 ]
    ++ lib.optional (!stdenv.isDarwin) [ pciutils ]
    ++ lib.optional jlinkSupport libjaylink;

  postPatch = ''
@@ -30,7 +31,8 @@ stdenv.mkDerivation rec {
  '';

  makeFlags = [ "PREFIX=$(out)" "libinstall" ]
    ++ lib.optional jlinkSupport "CONFIG_JLINK_SPI=yes";
    ++ lib.optional jlinkSupport "CONFIG_JLINK_SPI=yes"
    ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "CONFIG_INTERNAL_X86=no" "CONFIG_INTERNAL_DMI=no" "CONFIG_RAYER_SPI=no" ];

  postInstall = ''
    install -Dm644 util/flashrom_udev.rules $out/lib/udev/rules.d/flashrom.rules
@@ -42,6 +44,5 @@ stdenv.mkDerivation rec {
    license = licenses.gpl2;
    maintainers = with maintainers; [ fpletz felixsinger ];
    platforms = platforms.all;
    broken = stdenv.isDarwin; # requires DirectHW
  };
}