|
46 | 46 | # target the same way nixpkgs does for isStatic platforms. |
47 | 47 | static-liburing = final.liburing.overrideAttrs (old: { |
48 | 48 | dontdisableStatic = true; |
| 49 | + # Workaround for macOS builders: recreate man page symlinks that may be lost |
| 50 | + # during cross-compilation from Darwin to Linux |
| 51 | + preInstall = (old.preInstall or "") + '' |
| 52 | + echo "=== LIBURING PREINSTALL DEBUG ===" |
| 53 | + echo "PWD: $(pwd)" |
| 54 | + echo "Checking man directory contents BEFORE fix:" |
| 55 | + ls -la man/ | grep -E "(IO_URING|io_uring).*VERSION" || echo "No VERSION-related files found" |
| 56 | +
|
| 57 | + # Always recreate uppercase symlinks to ensure they exist for install phase |
| 58 | + # (lowercase versions are real files, not symlinks) |
| 59 | + echo "Creating/recreating man page symlinks..." |
| 60 | + ln -sf io_uring_check_version.3 man/IO_URING_CHECK_VERSION.3 |
| 61 | + ln -sf io_uring_check_version.3 man/IO_URING_VERSION_MAJOR.3 |
| 62 | + ln -sf io_uring_check_version.3 man/IO_URING_VERSION_MINOR.3 |
| 63 | +
|
| 64 | + echo "Checking man directory contents AFTER fix:" |
| 65 | + ls -la man/ | grep -E "(IO_URING|io_uring).*VERSION" |
| 66 | +
|
| 67 | + echo "Testing glob expansion of man/*.3:" |
| 68 | + ls man/*.3 | wc -l |
| 69 | + echo "Testing stat of specific failing files:" |
| 70 | + stat man/IO_URING_CHECK_VERSION.3 && echo " ✓ IO_URING_CHECK_VERSION.3 exists" || echo " ✗ IO_URING_CHECK_VERSION.3 missing" |
| 71 | + stat man/IO_URING_VERSION_MAJOR.3 && echo " ✓ IO_URING_VERSION_MAJOR.3 exists" || echo " ✗ IO_URING_VERSION_MAJOR.3 missing" |
| 72 | + stat man/io_uring_major_version.3 && echo " ✓ io_uring_major_version.3 exists" || echo " ✗ io_uring_major_version.3 missing" |
| 73 | +
|
| 74 | + echo "Testing install command dry-run (echo only):" |
| 75 | + echo "Would run: install -m 644 man/*.3 /tmp/test-dest/" |
| 76 | + echo "=== END LIBURING PREINSTALL DEBUG ===" |
| 77 | + ''; |
| 78 | + |
49 | 79 | postInstall = '' |
50 | 80 | # Always builds both static and dynamic libraries, so we need to remove the |
51 | 81 | # dynamic libraries. |
|
0 commit comments