Merge pull request #107431 from veprbl/pr/darling_src_fix
darwin.darling.src: fix build on case-sensitive filesystems
This commit is contained in:
commit
6eeab63be4
@ -8,11 +8,22 @@ stdenv.mkDerivation rec {
|
|||||||
url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
|
url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
|
||||||
sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf";
|
sha256 = "11b51fw47nl505h63bgx5kqiyhf3glhp1q6jkpb6nqfislnzzkrf";
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
# Get rid of case conflict
|
# The archive contains both `src/opendirectory` and `src/OpenDirectory`,
|
||||||
mkdir $out
|
# pre-create the directory to choose the canonical case on
|
||||||
|
# case-insensitive filesystems.
|
||||||
|
mkdir -p $out/src/OpenDirectory
|
||||||
|
|
||||||
cd $out
|
cd $out
|
||||||
tar -xzf $downloadedFile --strip-components=1
|
tar -xzf $downloadedFile --strip-components=1
|
||||||
rm -r $out/src/libm
|
rm -r $out/src/libm
|
||||||
|
|
||||||
|
# If `src/opendirectory` and `src/OpenDirectory` refer to different
|
||||||
|
# things, then combine them into `src/OpenDirectory` to match the result
|
||||||
|
# on case-insensitive filesystems.
|
||||||
|
if [ "$(stat -c %i src/opendirectory)" != "$(stat -c %i src/OpenDirectory)" ]; then
|
||||||
|
mv src/opendirectory/* src/OpenDirectory/
|
||||||
|
rmdir src/opendirectory
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user