Skip to content

Commit f9ef44b

Browse files
committed
readline: cross-compilation fixes for iOS
readline's configure doesn't recognize *-apple-ios as supporting shared libraries and reports "unsupported". nixpkgs' stdenv-generic adds --disable-static by default when configure exposes that knob, so the combination leaves Makefile with no targets and 'make all' produces nothing. The dev/man/info/doc outputs then come up empty and the build fails with 'failed to produce output path'. Flip the iOS host to dontDisableStatic + --enable-static (and pass --disable-shared explicitly to match). iOS apps ship static system libs in practice, mirroring the ncurses iOS treatment.
1 parent fe4c863 commit f9ef44b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

  • pkgs/development/libraries/readline

pkgs/development/libraries/readline/8.3.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ stdenv.mkDerivation (finalAttrs: {
9090
];
9191
};
9292

93+
# readline configure refuses shared libs on *-apple-ios; stdenv default
94+
# --disable-static would then leave Makefile with no targets. iOS only.
95+
dontDisableStatic = if stdenv.hostPlatform.isiOS then true else null;
96+
configureFlags = lib.optionals stdenv.hostPlatform.isiOS [
97+
"--enable-static"
98+
"--disable-shared"
99+
];
100+
93101
# This install error is caused by a very old libtool. We can't autoreconfHook this package,
94102
# so this is the best we've got!
95103
postInstall = lib.optionalString stdenv.hostPlatform.isOpenBSD ''

0 commit comments

Comments
 (0)