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

haskell: fix x509-system on mojave #47676

Merged
merged 1 commit into from
Oct 2, 2018

Conversation

matthewbauer
Copy link
Member

darwin.security_tool is currently broken in Mojave. See issue #45042
for more info. Our security_tool stuff comes from 10.9 so I suspect
that it needs an update.

Here I am putting in a hack to get things working again. This uses the
system provided security binary at /usr/bin/security to avoid the
issue in Haskell’s x509-system package. Unfortunately, this will break
with the sandbox. I am also working on a proper fix, but this requires
updating lots of Apple stuff (and also copumpkin’s new CF). You can
follow the progress on this branch:

https://github.com/matthewbauer/nixpkgs/tree/xcode-security

This commit should be backported to release-18.03 and release-18.09.

/cc @copumpkin @LnL7 @pikajude

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

I guess this is ok as a temporary fixup.

@@ -132,7 +132,7 @@ self: super: builtins.intersectAttrs super {
then let inherit (pkgs.darwin) security_tool;
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
postPatch = (drv.postPatch or "") + ''
substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security
substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
Copy link
Member

Choose a reason for hiding this comment

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

could you add a FIXME comment or something

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah - added

@matthewbauer
Copy link
Member Author

Yeah - the backport to 18.03 and 18.09 would be permanent, but we should be able to get things up to date for 19.03. It will all depend on whether there are any side effects from updating stuff.

@LnL7
Copy link
Member

LnL7 commented Oct 2, 2018

I didn't backport the Mojave changes to 18.03 yet, but yeah keeping this there is fine since fixing it properly would imply pulling in a significant amount of stdenv/sdk changes.

darwin.security_tool is currently broken in Mojave. See issue NixOS#45042
for more info. Our security_tool stuff comes from 10.9 so I suspect
that it needs an update.

Here I am putting in a hack to get things working again. This uses the
system provided security binary at /usr/bin/security to avoid the
issue in Haskell’s x509-system package. Unfortunately, this will break
with the sandbox. I am also working on a proper fix, but this requires
updating lots of Apple stuff (and also copumpkin’s new CF). You can
follow the progress on this branch:

  https://github.com/matthewbauer/nixpkgs/tree/xcode-security

This commit should be backported to release-18.03 and release-18.09.

/cc @copumpkin @LnL7 @pikajude
@matthewbauer matthewbauer merged commit a88b8da into NixOS:master Oct 2, 2018
@ryantrinkle
Copy link
Contributor

Is there anywhere I can track the backport progress? I'd like to make sure I bump things in reflex-platform, which is currently tracking 18.09, as soon as possible.

@LnL7
Copy link
Member

LnL7 commented Oct 25, 2018

It should be in the channel already 79bbe4d.

@matthewbauer Use git cherry-pick -x next time, that makes it easier to find.

@matthewbauer matthewbauer deleted the security-mojave-fix branch February 22, 2019 04:25
michaelpj pushed a commit to input-output-hk/haskell.nix that referenced this pull request Dec 16, 2020
This mirrors the workaround in nixpkgs for haskellPackages.

ref: NixOS/nixpkgs#47676
booniepepper pushed a commit to booniepepper/haskell.nix that referenced this pull request Feb 4, 2022
This mirrors the workaround in nixpkgs for haskellPackages.

ref: NixOS/nixpkgs#47676
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: haskell 10.rebuild-darwin: 101-500 10.rebuild-linux: 0 This PR does not cause any packages to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants