Merge pull request #117780 from cmacrae/fix/spacebar

spacebar: fix builds on macOS Big Sur
This commit is contained in:
Jörg Thalheim 2021-04-16 18:12:46 +01:00 committed by GitHub
commit 625fc39c2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View File

@ -192,6 +192,20 @@ let
mkdir -p $out/Library/Frameworks/ mkdir -p $out/Library/Frameworks/
cp -r ${darwin-stubs}/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework \ cp -r ${darwin-stubs}/System/Library/${lib.optionalString private "Private"}Frameworks/${name}.framework \
$out/Library/Frameworks $out/Library/Frameworks
cd $out/Library/Frameworks/${name}.framework
versions=(./Versions/*)
if [ "''${#versions[@]}" != 1 ]; then
echo "Unable to determine current version of framework ${name}"
exit 1
fi
current=$(basename ''${versions[0]})
chmod u+w -R .
ln -s "$current" Versions/Current
ln -s Versions/Current/* .
# NOTE there's no re-export checking here, this is probably wrong # NOTE there's no re-export checking here, this is probably wrong
''; '';
}; };
@ -312,7 +326,7 @@ in rec {
"Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd" "Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd"
]; ];
}); });
} // lib.genAttrs [ "ContactsPersistence" "UIFoundation" "GameCenter" ] (x: tbdOnlyFramework x {}); } // lib.genAttrs [ "ContactsPersistence" "GameCenter" "SkyLight" "UIFoundation" ] (x: tbdOnlyFramework x {});
bareFrameworks = lib.mapAttrs framework (import ./frameworks.nix { bareFrameworks = lib.mapAttrs framework (import ./frameworks.nix {
inherit frameworks libs; inherit frameworks libs;

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, Carbon, Cocoa, ScriptingBridge }: { lib, stdenv, fetchFromGitHub, Carbon, Cocoa, ScriptingBridge, SkyLight }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "spacebar"; pname = "spacebar";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "0f5ddn3sx13rwwh0nfl784160s8ml3m5593d5fz2b1996aznzrsx"; sha256 = "0f5ddn3sx13rwwh0nfl784160s8ml3m5593d5fz2b1996aznzrsx";
}; };
buildInputs = [ Carbon Cocoa ScriptingBridge ]; buildInputs = [ Carbon Cocoa ScriptingBridge SkyLight ];
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin

View File

@ -8424,7 +8424,7 @@ in
spacebar = callPackage ../os-specific/darwin/spacebar { spacebar = callPackage ../os-specific/darwin/spacebar {
inherit (darwin.apple_sdk.frameworks) inherit (darwin.apple_sdk.frameworks)
Carbon Cocoa ScriptingBridge; Carbon Cocoa ScriptingBridge SkyLight;
}; };
spaceFM = callPackage ../applications/misc/spacefm { }; spaceFM = callPackage ../applications/misc/spacefm { };