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

darkstat: Fix build on darwin
This commit is contained in:
Thiago Kenji Okada 2022-05-12 21:46:30 +01:00 committed by GitHub
commit aa6dbf25dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libpcap, zlib }:
{ lib, stdenv, fetchpatch, fetchurl, libpcap, zlib }:
stdenv.mkDerivation rec {
version = "3.0.719";
@ -9,6 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "1mzddlim6dhd7jhr4smh0n2fa511nvyjhlx76b03vx7phnar1bxf";
};
patches = [
# Avoid multiple definitions of CLOCK_REALTIME on macOS 11,
# see https://github.com/emikulic/darkstat/pull/2
(fetchpatch {
url = "https://github.com/emikulic/darkstat/commit/d2fd232e1167dee6e7a2d88b9ab7acf2a129f697.diff";
sha256 = "0z5mpyc0q65qb6cn4xcrxl0vx21d8ibzaam5kjyrcw4icd8yg4jb";
})
];
buildInputs = [ libpcap zlib ];
enableParallelBuilding = true;