diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2023-01-08 12:02:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-08 12:02:42 +0000 |
commit | 3db5c89b986801f15589ca5b14627b45c07d0aa7 (patch) | |
tree | 3a0e9a8582929a15364ed05c405dcc240928a428 | |
parent | f5cc524d772fab76aadc7292f863c3988bc26c54 (diff) | |
parent | 8084188a439b2bbd3f1c02a7a52cf244be5f0801 (diff) |
Merge pull request #208985 from wegank/junkie-darwin
junkie: unbreak on aarch64-darwin
-rw-r--r-- | pkgs/tools/networking/junkie/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/networking/junkie/default.nix b/pkgs/tools/networking/junkie/default.nix index f2a0e24e0da7..9f7b4350f1b1 100644 --- a/pkgs/tools/networking/junkie/default.nix +++ b/pkgs/tools/networking/junkie/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, libpcap, guile, openssl }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libpcap, guile, openssl }: stdenv.mkDerivation rec { pname = "junkie"; @@ -10,6 +10,7 @@ stdenv.mkDerivation rec { rev = "v${version}"; sha256 = "0kfdjgch667gfb3qpiadd2dj3fxc7r19nr620gffb1ahca02wq31"; }; + patches = [ # Pull upstream patch for -fno-common toolchains: (fetchpatch { @@ -18,8 +19,14 @@ stdenv.mkDerivation rec { sha256 = "1qg01jinqn5wr2mz77rzaidnrli35di0k7lnx6kfm7dh7v8kxbrr"; }) ]; + + # IP_DONTFRAG is defined on macOS from Big Sur + postPatch = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' + sed -i '10i#undef IP_DONTFRAG' include/junkie/proto/ip.h + ''; + buildInputs = [ libpcap guile openssl ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; configureFlags = [ "GUILELIBDIR=\${out}/share/guile/site" "GUILECACHEDIR=\${out}/lib/guile/ccache" @@ -40,7 +47,5 @@ stdenv.mkDerivation rec { - a nettop tool; - a tool listing TLS certificates... ''; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; } |