2021-01-15 15:45:37 +01:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2017-01-08 09:25:46 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "DarwinTools-1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://opensource.apple.com/tarballs/DarwinTools/${name}.tar.gz";
|
|
|
|
sha256 = "0hh4jl590jv3v830p77r3jcrnpndy7p2b8ajai3ldpnx2913jfhp";
|
|
|
|
};
|
|
|
|
|
2021-04-19 06:11:17 +02:00
|
|
|
patches = [
|
|
|
|
./sw_vers-CFPriv.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2017-01-08 09:25:46 +01:00
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace gcc cc
|
|
|
|
'';
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
export SRCROOT=.
|
|
|
|
export SYMROOT=.
|
|
|
|
export DSTROOT=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/usr/* $out
|
|
|
|
rmdir $out/usr
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2021-01-15 15:45:37 +01:00
|
|
|
maintainers = [ lib.maintainers.matthewbauer ];
|
|
|
|
platforms = lib.platforms.darwin;
|
2017-01-08 09:25:46 +01:00
|
|
|
};
|
|
|
|
}
|