skia: unbreak darwin
This commit is contained in:
parent
adaa8dade5
commit
78705eaeb1
@ -17,6 +17,9 @@
|
|||||||
, vulkan-headers
|
, vulkan-headers
|
||||||
, vulkan-memory-allocator
|
, vulkan-memory-allocator
|
||||||
, xcbuild
|
, xcbuild
|
||||||
|
, cctools
|
||||||
|
, zlib
|
||||||
|
, apple-sdk_11
|
||||||
|
|
||||||
, enableVulkan ? !stdenv.hostPlatform.isDarwin
|
, enableVulkan ? !stdenv.hostPlatform.isDarwin
|
||||||
}:
|
}:
|
||||||
@ -46,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
gn
|
gn
|
||||||
ninja
|
ninja
|
||||||
python3
|
python3
|
||||||
] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild;
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild cctools.libtool zlib ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
expat
|
expat
|
||||||
@ -61,6 +64,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
] ++ lib.optionals enableVulkan [
|
] ++ lib.optionals enableVulkan [
|
||||||
vulkan-headers
|
vulkan-headers
|
||||||
vulkan-memory-allocator
|
vulkan-memory-allocator
|
||||||
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
apple-sdk_11 # can be removed once x86_64-darwin defaults to a newer SDK
|
||||||
];
|
];
|
||||||
|
|
||||||
gnFlags = let
|
gnFlags = let
|
||||||
@ -92,13 +97,15 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
"skia_use_vulkan=true"
|
"skia_use_vulkan=true"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lz";
|
||||||
|
|
||||||
# Somewhat arbitrary, but similar to what other distros are doing
|
# Somewhat arbitrary, but similar to what other distros are doing
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
# Libraries
|
# Libraries
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
cp *.so *.a $out/lib
|
cp *.so *.a *.dylib $out/lib
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
pushd ../../include
|
pushd ../../include
|
||||||
@ -144,7 +151,5 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
maintainers = with lib.maintainers; [ fgaz ];
|
maintainers = with lib.maintainers; [ fgaz ];
|
||||||
platforms = with lib.platforms; arm ++ aarch64 ++ x86 ++ x86_64;
|
platforms = with lib.platforms; arm ++ aarch64 ++ x86 ++ x86_64;
|
||||||
pkgConfigModules = [ "skia" ];
|
pkgConfigModules = [ "skia" ];
|
||||||
# https://github.com/NixOS/nixpkgs/pull/325871#issuecomment-2220610016
|
|
||||||
broken = stdenv.hostPlatform.isDarwin;
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user