Loading pkgs/development/libraries/mesa/darwin.nix +63 −0 Original line number Diff line number Diff line Loading @@ -3,8 +3,12 @@ lib, stdenv, fetchFromGitLab, apple-sdk_26, bison, darwinMinVersionHook, flex, glslang, libpng, libxml2, llvmPackages, meson, Loading @@ -15,8 +19,30 @@ libxext, libx11, libxcb, libxshmfence, spirv-llvm-translator, spirv-tools, zlib, eglPlatforms ? [ "macos" "x11" ], galliumDrivers ? [ "llvmpipe" # software renderer "softpipe" # older software renderer ], vulkanDrivers ? [ "kosmickrisp" # Vulkan on Metal ], vulkanLayers ? [ "anti-lag" "intel-nullhw" "overlay" "screenshot" "vram-report-limit" ], }: let common = import ./common.nix { inherit lib fetchFromGitLab; }; in Loading @@ -28,6 +54,11 @@ stdenv.mkDerivation { meta ; patches = [ # Required to build KosmicKrisp ./opencl.patch ]; outputs = [ "out" "dev" Loading @@ -36,6 +67,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ bison flex # Use bin output from glslang to not propagate the dev output at # the build time with the host glslang. (lib.getBin glslang) meson ninja pkg-config Loading @@ -46,12 +80,21 @@ stdenv.mkDerivation { ]; buildInputs = [ apple-sdk_26 # KosmicKrisp requires Metal 4 to build, but … (darwinMinVersionHook "15.0") # … it supports back to Metal 3.2, which requires macOS 15. libpng libxml2 # should be propagated from libllvm llvmPackages.libclang llvmPackages.libclc llvmPackages.libllvm python3Packages.python # for shebang spirv-llvm-translator spirv-tools libx11 libxext libxfixes libxcb libxshmfence zlib ]; Loading @@ -60,10 +103,30 @@ stdenv.mkDerivation { mesonFlags = [ "--sysconfdir=/etc" "--datadir=${placeholder "out"}/share" # What to build (lib.mesonOption "platforms" (lib.concatStringsSep "," eglPlatforms)) (lib.mesonOption "gallium-drivers" (lib.concatStringsSep "," galliumDrivers)) (lib.mesonOption "vulkan-drivers" (lib.concatStringsSep "," vulkanDrivers)) (lib.mesonOption "vulkan-layers" (lib.concatStringsSep "," vulkanLayers)) # Disable glvnd on Darwin (lib.mesonEnable "glvnd" false) (lib.mesonEnable "gbm" false) (lib.mesonBool "libgbm-external" false) # Needed for KosmicKrisp (lib.mesonOption "clang-libdir" "${lib.getLib llvmPackages.libclang}/lib") (lib.mesonEnable "llvm" true) (lib.mesonEnable "shared-llvm" true) (lib.mesonEnable "spirv-tools" true) # Needed for Apple GLX support (lib.mesonOption "glx" "dri") ]; mesonBuildType = "release"; passthru = { # needed to pass evaluation of bad platforms driverLink = throw "driverLink not supported on darwin"; Loading Loading
pkgs/development/libraries/mesa/darwin.nix +63 −0 Original line number Diff line number Diff line Loading @@ -3,8 +3,12 @@ lib, stdenv, fetchFromGitLab, apple-sdk_26, bison, darwinMinVersionHook, flex, glslang, libpng, libxml2, llvmPackages, meson, Loading @@ -15,8 +19,30 @@ libxext, libx11, libxcb, libxshmfence, spirv-llvm-translator, spirv-tools, zlib, eglPlatforms ? [ "macos" "x11" ], galliumDrivers ? [ "llvmpipe" # software renderer "softpipe" # older software renderer ], vulkanDrivers ? [ "kosmickrisp" # Vulkan on Metal ], vulkanLayers ? [ "anti-lag" "intel-nullhw" "overlay" "screenshot" "vram-report-limit" ], }: let common = import ./common.nix { inherit lib fetchFromGitLab; }; in Loading @@ -28,6 +54,11 @@ stdenv.mkDerivation { meta ; patches = [ # Required to build KosmicKrisp ./opencl.patch ]; outputs = [ "out" "dev" Loading @@ -36,6 +67,9 @@ stdenv.mkDerivation { nativeBuildInputs = [ bison flex # Use bin output from glslang to not propagate the dev output at # the build time with the host glslang. (lib.getBin glslang) meson ninja pkg-config Loading @@ -46,12 +80,21 @@ stdenv.mkDerivation { ]; buildInputs = [ apple-sdk_26 # KosmicKrisp requires Metal 4 to build, but … (darwinMinVersionHook "15.0") # … it supports back to Metal 3.2, which requires macOS 15. libpng libxml2 # should be propagated from libllvm llvmPackages.libclang llvmPackages.libclc llvmPackages.libllvm python3Packages.python # for shebang spirv-llvm-translator spirv-tools libx11 libxext libxfixes libxcb libxshmfence zlib ]; Loading @@ -60,10 +103,30 @@ stdenv.mkDerivation { mesonFlags = [ "--sysconfdir=/etc" "--datadir=${placeholder "out"}/share" # What to build (lib.mesonOption "platforms" (lib.concatStringsSep "," eglPlatforms)) (lib.mesonOption "gallium-drivers" (lib.concatStringsSep "," galliumDrivers)) (lib.mesonOption "vulkan-drivers" (lib.concatStringsSep "," vulkanDrivers)) (lib.mesonOption "vulkan-layers" (lib.concatStringsSep "," vulkanLayers)) # Disable glvnd on Darwin (lib.mesonEnable "glvnd" false) (lib.mesonEnable "gbm" false) (lib.mesonBool "libgbm-external" false) # Needed for KosmicKrisp (lib.mesonOption "clang-libdir" "${lib.getLib llvmPackages.libclang}/lib") (lib.mesonEnable "llvm" true) (lib.mesonEnable "shared-llvm" true) (lib.mesonEnable "spirv-tools" true) # Needed for Apple GLX support (lib.mesonOption "glx" "dri") ]; mesonBuildType = "release"; passthru = { # needed to pass evaluation of bad platforms driverLink = throw "driverLink not supported on darwin"; Loading