depot/third_party/nixpkgs/pkgs/os-specific/darwin/DarwinTools/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

36 lines
744 B
Nix

{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "DarwinTools";
version = "1";
src = fetchurl {
url = "https://web.archive.org/web/20180408044816/https://opensource.apple.com/tarballs/DarwinTools/DarwinTools-${version}.tar.gz";
hash = "sha256-Fzo5QhLd3kZHVFKhJe7xzV6bmRz5nAsG2mNLkAqVBEI=";
};
patches = [
./sw_vers-CFPriv.patch
];
configurePhase = ''
export SRCROOT=.
export SYMROOT=.
export DSTROOT=$out
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"STRIP=${stdenv.cc.targetPrefix}strip"
];
postInstall = ''
mv $out/usr/* $out
rmdir $out/usr
'';
meta = {
maintainers = [ lib.maintainers.matthewbauer ];
platforms = lib.platforms.darwin;
};
}