Merge pull request #172662 from avdv/fix-darkstat-darwin

darkstat: Fix build on darwin

authored by Thiago Kenji Okada and committed by GitHub aa6dbf25 e2992b18

+10 -1
+10 -1
pkgs/tools/networking/darkstat/default.nix
··· 1 - { lib, stdenv, fetchurl, libpcap, zlib }: 1 + { lib, stdenv, fetchpatch, fetchurl, libpcap, zlib }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 version = "3.0.719"; ··· 8 8 url = "${meta.homepage}/${pname}-${version}.tar.bz2"; 9 9 sha256 = "1mzddlim6dhd7jhr4smh0n2fa511nvyjhlx76b03vx7phnar1bxf"; 10 10 }; 11 + 12 + patches = [ 13 + # Avoid multiple definitions of CLOCK_REALTIME on macOS 11, 14 + # see https://github.com/emikulic/darkstat/pull/2 15 + (fetchpatch { 16 + url = "https://github.com/emikulic/darkstat/commit/d2fd232e1167dee6e7a2d88b9ab7acf2a129f697.diff"; 17 + sha256 = "0z5mpyc0q65qb6cn4xcrxl0vx21d8ibzaam5kjyrcw4icd8yg4jb"; 18 + }) 19 + ]; 11 20 12 21 buildInputs = [ libpcap zlib ]; 13 22