Unverified Commit 8a6c901e authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #258864 from Kloenk/nload-darwin

nload: enable on darwin
parents 4d34cbee 9673ba41
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, fetchpatch, ncurses }:
{ lib, stdenv, fetchurl, fetchpatch, ncurses, autoreconfHook }:

stdenv.mkDerivation rec {
  version = "0.7.4";
@@ -20,8 +20,23 @@ stdenv.mkDerivation rec {
      name = "nload-0.7.4-Eliminate-flicker-on-some-terminals.patch";
      sha256 = "10yppy5l50wzpcvagsqkbyf1rcan6aj30am4rw8hmkgnbidf4zbq";
    })
    # Patches configure.in file to make configure compile on macOS.
    # Patch taken from MacPorts.
    (fetchpatch {
      url = "https://github.com/macports/macports-ports/raw/28814c34711e7545929fd391feb6ce079bd73fd4/net/nload/files/patch-configure.in.diff";
      extraPrefix = "";
      hash = "sha256-lGbBG5ZOgMVnrwlwXVFGbUZx6RkmQwYSVLB3oqkAWRs=";
    })
    # Fixes crash on F2 and garbage in adapter name.
    # Patch taken from Homebrew.
    (fetchpatch {
      url = "https://sourceforge.net/p/nload/bugs/_discuss/thread/c9b68d8e/4a65/attachment/devreader-bsd.cpp.patch";
      extraPrefix = "";
      hash = "sha256-umRQDqcRUOGELOx5iB6CPFRkjaD8HXkMCWiKsYdaUa0=";
    })
  ];

  nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook;
  buildInputs = [ ncurses ];

  meta = {
@@ -34,7 +49,7 @@ stdenv.mkDerivation rec {
    '';
    homepage = "http://www.roland-riegel.de/nload/index.html";
    license = lib.licenses.gpl2;
    platforms = lib.platforms.linux;
    platforms = lib.platforms.unix;
    maintainers = [ lib.maintainers.devhell ];
    mainProgram = "nload";
  };