2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "DarwinTools";
|
|
|
|
version = "1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://opensource.apple.com/tarballs/DarwinTools/DarwinTools-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0hh4jl590jv3v830p77r3jcrnpndy7p2b8ajai3ldpnx2913jfhp";
|
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
patches = [
|
|
|
|
./sw_vers-CFPriv.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace gcc cc
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
export SRCROOT=.
|
|
|
|
export SYMROOT=.
|
|
|
|
export DSTROOT=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/usr/* $out
|
|
|
|
rmdir $out/usr
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ lib.maintainers.matthewbauer ];
|
|
|
|
platforms = lib.platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|