Merge pull request #233657 from wegank/darwin-system-redo

darwin.apple_sdk_10_12.frameworks.System: init
This commit is contained in:
Weijia Wang 2023-06-05 11:43:39 +03:00 committed by GitHub
commit ad7fbd276f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 10 deletions

View file

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, cmake, ninja, pkg-config, m4, bash
, xdg-utils, zip, unzip, gzip, bzip2, gnutar, p7zip, xz
, IOKit, Carbon, Cocoa, AudioToolbox, OpenGL
, IOKit, Carbon, Cocoa, AudioToolbox, OpenGL, System
, withTTYX ? true, libX11
, withGUI ? true, wxGTK32
, withUCD ? true, libuchardet
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
++ lib.optionals withNetRocks [ openssl libssh libnfs neon ]
++ lib.optional (withNetRocks && !stdenv.isDarwin) samba # broken on darwin
++ lib.optionals withPython (with python3Packages; [ python cffi debugpy pcpp ])
++ lib.optionals stdenv.isDarwin [ IOKit Carbon Cocoa AudioToolbox OpenGL ];
++ lib.optionals stdenv.isDarwin [ IOKit Carbon Cocoa AudioToolbox OpenGL System ];
postPatch = ''
patchShebangs python/src/prebuild.sh
@ -43,9 +43,6 @@ stdenv.mkDerivation rec {
--replace '"/bin/bash"' '"${bash}/bin/bash"'
substituteInPlace far2l/src/cfg/config.cpp \
--replace '"/bin/bash"' '"${bash}/bin/bash"'
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace WinPort/src/Backend/WX/CMakeLists.txt \
--replace "-framework System" -lSystem
'';
cmakeFlags = lib.mapAttrsToList (k: v: "-D${k}=${if v then "yes" else "no"}") {

View file

@ -320,6 +320,15 @@ in rec {
'';
});
System = lib.overrideDerivation super.System (drv: {
installPhase = ''
mkdir -p $out/Library/Frameworks/System.framework/Versions/B
ln -s $out/Library/Frameworks/System.framework/Versions/{B,Current}
ln -s ${pkgs.darwin.Libsystem}/lib/libSystem.B.tbd $out/Library/Frameworks/System.framework/Versions/B/System.tbd
ln -s $out/Library/Frameworks/System.framework/{Versions/Current/,}System.tbd
'';
});
WebKit = lib.overrideDerivation super.WebKit (drv: {
extraTBDFiles = [
"Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore.tbd"

View file

@ -104,6 +104,7 @@ with frameworks; with libs; {
SpriteKit = {};
StoreKit = {};
SyncServices = {};
System = {};
SystemConfiguration = { inherit Security; };
TWAIN = { inherit Carbon; };
Tcl = {};

View file

@ -24,16 +24,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ bison flex ] ++
lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.DiskArbitration
darwin.apple_sdk.frameworks.System
];
buildInputs = [ zlib.dev libxcrypt ] ++
lib.optionals useSSL [ openssl ] ++
lib.optionals usePAM [ pam ];
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure --replace "-framework System" "-lSystem"
'';
configureFlags = [
(lib.withFeature usePAM "pam")
] ++ (if useSSL then [

View file

@ -20362,7 +20362,7 @@ with pkgs;
far2l = callPackage ../applications/misc/far2l {
stdenv = if stdenv.cc.isClang then llvmPackages.stdenv else stdenv;
inherit (darwin.apple_sdk.frameworks) IOKit Carbon Cocoa AudioToolbox OpenGL;
inherit (darwin.apple_sdk.frameworks) IOKit Carbon Cocoa AudioToolbox OpenGL System;
};
farbfeld = callPackage ../development/libraries/farbfeld { };