summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/security-tool/default.nix
blob: 49d61f392c5eb044218e20e309125ee1ea306e33 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
  };
}