Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bftpd: fix x86_64-darwin build #353061

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions pkgs/servers/ftp/bftpd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ stdenv.mkDerivation rec {
sha256 = "sha256-lZGFsUV6LNjkBNUpV9UYedVt1yt1qTBJUorxGt4ApsI=";
};

# utmp.h is deprecated on aarch64-darwin
postPatch = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
# utmp has been replaced by utmpx since Mac OS X 10.6 (Snow Leopard):
#
# https://stackoverflow.com/a/37913019
#
# bftpd does not have support for this, so disable it.
#
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
for file in login.*; do
substituteInPlace $file --replace "#ifdef HAVE_UTMP_H" "#if 0"
substituteInPlace $file --replace-fail "#ifdef HAVE_UTMP_H" "#if 0"
done
'';

Expand Down