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

Let’s compile the Mac OS X SecurityTool ourselves #4326

Merged
merged 1 commit into from
Oct 1, 2014

Conversation

copumpkin
Copy link
Member

This allows us to compile SecurityTool ourselves. There are several more Apple opensource projects that can be compiled this way that I'll slowly add.

Remaining sources of impurity:

  • Reference to absolute path to Xcode. This should be integrated with the xcode derivation (and the iOS wrapper chain that exists under mobile development) but it's not obvious how to do that yet.
  • Absolute reference to xcodebuild.

Adding this should make it possible for #3629 to work reasonably cleanly.

@Fuuzetsu Fuuzetsu added 0.kind: enhancement Add something new 6.topic: darwin Running or building packages on Darwin and removed 6.topic: darwin Running or building packages on Darwin labels Sep 30, 2014
configurePhase = "true";

buildPhase = ''
python PrivateSDK.py -i ${osx_sdk}/Developer/SDKs/MacOSX${sdkVersion}.sdk -o PrivateMacOSX${sdkVersion}.sdk
Copy link
Contributor

Choose a reason for hiding this comment

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

It's probably best to just use the absolute path to the sdk folder on the system; otherwise, anything depending on osx_sdk will try to pull down a substitute from Hydra, which is probably not good for legal and practical reasons.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe if I just mark it as unfree? I wanted to bundle the SDK up so we could construct it in other ways.

Copy link
Contributor

Choose a reason for hiding this comment

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

That should be sufficient, I think.

@copumpkin
Copy link
Member Author

Pushed an amended commit with unfree licenses on the two SDKs (don't want hydra caching them, and I think that'll stop that). SecurityTool itself is under the APSL 2.0.

@copumpkin
Copy link
Member Author

Now that I have a fetchadc in #4327, we should be able to refer to the Mac OS SDK and xcodebuild in the store, but I don't have time tonight to set those up.

@copumpkin
Copy link
Member Author

@shlevy your wish is my command

@shlevy shlevy merged commit 58ea86b into NixOS:master Oct 1, 2014
in stdenv.mkDerivation {
name = "MacOSX10.9.sdk";

src = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk";
Copy link
Member

Choose a reason for hiding this comment

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

The environment variable SDKROOT already contains the path to the SDK, so no reason to hard-code it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair enough. I'm going to be changing this to (at least optionally) build on top of my fetchadc function soon, so I'll make sure this is sensible when I get back to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: darwin Running or building packages on Darwin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants