-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let’s compile the Mac OS X SecurityTool ourselves
- Loading branch information
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ stdenv, fetchFromGitHub, python, osx_sdk }: | ||
|
||
let | ||
sdkVersion = "10.9"; | ||
in stdenv.mkDerivation { | ||
name = "PrivateMacOSX${sdkVersion}.sdk"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "copumpkin"; | ||
repo = "OSXPrivateSDK"; | ||
rev = "bde9cba13e6ae62a8e4e0f405008ea719526e7ad"; | ||
sha256 = "1vj3fxwp32irxjk987p7a223sm5bl5rrlajcvgy69k0wb0fp0krc"; | ||
}; | ||
|
||
buildInputs = [ python ]; | ||
|
||
configurePhase = "true"; | ||
|
||
buildPhase = '' | ||
python PrivateSDK.py -i ${osx_sdk}/Developer/SDKs/MacOSX${sdkVersion}.sdk -o PrivateMacOSX${sdkVersion}.sdk | ||
''; | ||
|
||
installPhase = '' | ||
mkdir -p $out/Developer/SDKs/ | ||
mv PrivateMacOSX${sdkVersion}.sdk $out/Developer/SDKs | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "A private Mac OS ${version} SDK, suitable for building many of Apple's open source releases"; | ||
maintainers = with maintainers; [ copumpkin ]; | ||
platforms = platforms.darwin; | ||
license = licenses.unfree; | ||
}; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ stdenv }: | ||
|
||
let | ||
version = "10.9"; | ||
in stdenv.mkDerivation { | ||
name = "MacOSX10.9.sdk"; | ||
|
||
src = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; | ||
|
||
unpackPhase = "true"; | ||
configurePhase = "true"; | ||
buildPhase = "true"; | ||
|
||
installPhase = '' | ||
mkdir -p $out/Developer/SDKs/ | ||
echo "Source is: $src" | ||
cp -r $src $out/Developer/SDKs/ | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "The Mac OS ${version} SDK"; | ||
maintainers = with maintainers; [ copumpkin ]; | ||
platforms = platforms.darwin; | ||
license = licenses.unfree; | ||
}; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ stdenv, fetchurl, osx_private_sdk }: | ||
|
||
stdenv.mkDerivation rec { | ||
version = "55115"; | ||
name = "SecurityTool-${version}"; | ||
|
||
src = fetchurl { | ||
url = "http://opensource.apple.com/tarballs/SecurityTool/SecurityTool-${version}.tar.gz"; | ||
sha256 = "0apcz4vy2z5645jhrs60wj3w27mncjjqv42h5lln36g6qs2n9113"; | ||
}; | ||
|
||
configurePhase = ""; | ||
|
||
# Someday we shall purge this impurity! | ||
buildPhase = '' | ||
/usr/bin/xcodebuild SDKROOT=${osx_private_sdk}/Developer/SDKs/PrivateMacOSX10.9.sdk/ | ||
''; | ||
|
||
installPhase = '' | ||
mkdir -p $out/bin/ | ||
cp build/Release/security $out/bin | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "Command line interface to Mac OS X keychains and Security framework"; | ||
maintainers = with maintainers; [ copumpkin ]; | ||
platforms = platforms.darwin; | ||
license = licenses.apsl20; | ||
}; | ||
} |
This file contains 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