···88 url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
99 sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf";
1010 postFetch = ''
1111- # Get rid of case conflict
1212- mkdir $out
1111+ # The archive contains both `src/opendirectory` and `src/OpenDirectory`,
1212+ # pre-create the directory to choose the canonical case on
1313+ # case-insensitive filesystems.
1414+ mkdir -p $out/src/OpenDirectory
1515+1316 cd $out
1417 tar -xzf $downloadedFile --strip-components=1
1518 rm -r $out/src/libm
1919+2020+ # If `src/opendirectory` and `src/OpenDirectory` refer to different
2121+ # things, then combine them into `src/OpenDirectory` to match the result
2222+ # on case-insensitive filesystems.
2323+ if [ "$(stat -c %i src/opendirectory)" != "$(stat -c %i src/OpenDirectory)" ]; then
2424+ mv src/opendirectory/* src/OpenDirectory/
2525+ rmdir src/opendirectory
2626+ fi
1627 '';
1728 };
1829