Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl: gate darwin workarounds behind stdenv.isDarwin to make life on linux easier #169331

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

SuperSandro2000
Copy link
Member

Closes #3382

Description of changes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Apr 19, 2022

I prefer patching only those that are affected as well, however, I know there are those that have a different view. Their view is to apply it for everyone because that way you can detect easily when a patch does not apply anymore and it will more likely be fixed.

@@ -136,6 +131,12 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.hostPlatform.isWindows [
"--disable-shared"
"--enable-static"
] ++ lib.optionals stdenv.isDarwin [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to use stdenv.hostPlatform.isDarwin instead to take care of the cross-compiling cases here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thiagokokada
Copy link
Contributor

I prefer patching only those that are affected as well, however, I know there are those that have a different view. Their view is to apply it for everyone because that way you can detect easily when a patch does not apply anymore and it will more likely be fixed.

Not related to this PR, but I think we need to have a clearer instance about Darwin.

It is clearly a "best effort" platform that causes tons of headaches thanks to the inability of Apple of supplying good sources where we can base our stdenv on, that is also constantly changing and breaking things at each update making each upgrade a mess.

Not criticizing the excellent work of the Darwin maintainers, but it really is a platform that is a PITA to work with.

@SuperSandro2000
Copy link
Member Author

I prefer patching only those that are affected as well, however, I know there are those that have a different view. Their view is to apply it for everyone because that way you can detect easily when a patch does not apply anymore and it will more likely be fixed.

Normally this is the case but since the flags make the linux experience actually worse I think we can make an exception here.

@SuperSandro2000 SuperSandro2000 merged commit 116fc66 into NixOS:staging Apr 20, 2022
@SuperSandro2000 SuperSandro2000 deleted the curl branch April 20, 2022 17:49
@Izorkin Izorkin mentioned this pull request May 11, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants