darwin.darling.src: fix build on case-sensitive filesystems#107431
Merged
veprbl merged 1 commit intoNixOS:masterfrom Apr 18, 2021
Merged
darwin.darling.src: fix build on case-sensitive filesystems#107431veprbl merged 1 commit intoNixOS:masterfrom
veprbl merged 1 commit intoNixOS:masterfrom
Conversation
Member
Author
|
@GrahamcOfBorg build darling.src |
250b6a9 to
c61d59f
Compare
Member
Author
|
@GrahamcOfBorg build darwin.darling.src |
Member
|
Thanks for working on this. I think there are two things that need to be handled. The first is with case-sensitive filesystems in which the directories are split, and the second is with case-insensitive filesystems where the result is non-deterministic (the canonical name is either lowercase or camelcase). Maybe something like this. It seems to work on my case-insensitive macOS and my case-sensitive linux. fetchzip {
url = "https://github.com/darlinghq/darling/archive/d2cc5fa748003aaa70ad4180fff0a9a85dc65e9b.tar.gz";
sha256 = "0000000000000000000000000000000000000000000000000000"; # for testing
postFetch = ''
# Get rid of case conflicts
mkdir $out
# The archive contains both `src/opendirectory` and `src/OpenDirectory`,
# pre-create the directory to choose the canonical case on
# case-insensitive filesystems.
mkdir -p $out/src/OpenDirectory
cd $out
tar -xzf $downloadedFile --strip-components=1
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
'';
} |
Co-authored-by: Andrew Childs <lorne@cons.org.nz>
c61d59f to
1a25e9b
Compare
Contributor
|
@veprbl this has been fixed on upstream darlinghq/darling@ea5f07d , should we use an updated source instead of fixing it here? We need darling to update xnu and Libsystem. |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Fix #91480 as discussed in #101799 (comment)
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)