Merge pull request #258864 from Kloenk/nload-darwin

nload: enable on darwin
This commit is contained in:
Mario Rodas 2023-10-10 08:58:58 -05:00 committed by GitHub
commit 8a6c901e87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ 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";
};