push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{ lib, fetchFromGitLab }:
# When updating this package, please verify at least these build (assuming x86_64-linux):
# nix build .#mesa .#pkgsi686Linux.mesa .#pkgsCross.aarch64-multiplatform.mesa .#pkgsMusl.mesa
# Ideally also verify:
# nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa
rec {
pname = "mesa";
version = "25.2.4";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "mesa";
rev = "mesa-${version}";
hash = "sha256-75bJyFGaLc8H9w83O1WXIrFFFP7/O5HNzabdqkWI/hQ=";
};
meta = {
description = "Open source 3D graphics library";
longDescription = ''
The Mesa project began as an open-source implementation of the OpenGL
specification - a system for rendering interactive 3D graphics. Over the
years the project has grown to implement more graphics APIs, including
OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and
Vulkan. A variety of device drivers allows the Mesa libraries to be used
in many different environments ranging from software emulation to
complete hardware acceleration for modern GPUs.
'';
homepage = "https://www.mesa3d.org/";
changelog = "https://docs.mesa3d.org/relnotes/${version}.html";
license = with lib.licenses; [ mit ]; # X11 variant, in most files
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
k900
vcunat
]; # Help is welcome :)
};
}

View File

@@ -0,0 +1,72 @@
# The Darwin build of Mesa is different enough that we just give it an entire separate expression.
{
lib,
stdenv,
fetchFromGitLab,
bison,
flex,
libxml2,
llvmPackages,
meson,
ninja,
pkg-config,
python3Packages,
xorg,
zlib,
}:
let
common = import ./common.nix { inherit lib fetchFromGitLab; };
in
stdenv.mkDerivation {
inherit (common)
pname
version
src
meta
;
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
bison
flex
meson
ninja
pkg-config
python3Packages.packaging
python3Packages.python
python3Packages.mako
python3Packages.pyyaml
];
buildInputs = [
libxml2 # should be propagated from libllvm
llvmPackages.libllvm
xorg.libX11
xorg.libXext
xorg.libXfixes
xorg.libxcb
zlib
];
mesonAutoFeatures = "disabled";
mesonFlags = [
"--sysconfdir=/etc"
"--datadir=${placeholder "out"}/share"
(lib.mesonEnable "glvnd" false)
(lib.mesonEnable "shared-glapi" true)
(lib.mesonEnable "llvm" true)
];
passthru = {
# needed to pass evaluation of bad platforms
driverLink = throw "driverLink not supported on darwin";
# Don't need this on Darwin.
llvmpipeHook = null;
};
}

View File

@@ -0,0 +1,407 @@
{
lib,
bison,
buildPackages,
directx-headers,
elfutils,
expat,
fetchCrate,
fetchFromGitLab,
file,
flex,
glslang,
spirv-tools,
intltool,
jdupes,
libdrm,
libgbm,
libglvnd,
libpng,
libunwind,
libva-minimal,
libvdpau,
llvmPackages,
lm_sensors,
meson,
ninja,
pkg-config,
python3Packages,
runCommand,
rust-bindgen,
rust-cbindgen,
rustc,
spirv-llvm-translator,
stdenv,
udev,
valgrind-light,
vulkan-loader,
wayland,
wayland-protocols,
wayland-scanner,
xcbutilkeysyms,
xorg,
zstd,
enablePatentEncumberedCodecs ? true,
withValgrind ? lib.meta.availableOn stdenv.hostPlatform valgrind-light,
# We enable as many drivers as possible here, to build cross tools
# and support emulation use cases (emulated x86_64 on aarch64, etc)
galliumDrivers ? [
"asahi" # Apple AGX
"crocus" # Intel legacy
"d3d12" # WSL emulated GPU (aka Dozen)
"etnaviv" # Vivante GPU designs (mostly NXP/Marvell SoCs)
"freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
"i915" # Intel extra legacy
"iris" # new Intel (Broadwell+)
"lima" # ARM Mali 4xx
"llvmpipe" # software renderer
"nouveau" # Nvidia
"panfrost" # ARM Mali Midgard and up (T/G series)
"r300" # very old AMD
"r600" # less old AMD
"radeonsi" # new AMD (GCN+)
"softpipe" # older software renderer
"svga" # VMWare virtualized GPU
"tegra" # Nvidia Tegra SoCs
"v3d" # Broadcom VC5 (Raspberry Pi 4)
"vc4" # Broadcom VC4 (Raspberry Pi 0-3)
"virgl" # QEMU virtualized GPU (aka VirGL)
"zink" # generic OpenGL over Vulkan, experimental
],
vulkanDrivers ? [
"amd" # AMD (aka RADV)
"asahi" # Apple AGX
"broadcom" # Broadcom VC5 (Raspberry Pi 4, aka V3D)
"freedreno" # Qualcomm Adreno (all Qualcomm SoCs)
"gfxstream" # Android virtualized GPU
"imagination-experimental" # PowerVR Rogue (currently N/A)
"intel_hasvk" # Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
"intel" # new Intel (aka ANV)
"microsoft-experimental" # WSL virtualized GPU (aka DZN/Dozen)
"nouveau" # Nouveau (aka NVK)
"panfrost" # ARM Mali Midgard and up (T/G series)
"swrast" # software renderer (aka Lavapipe)
]
++
lib.optionals
(stdenv.hostPlatform.isAarch -> lib.versionAtLeast stdenv.hostPlatform.parsed.cpu.version "6")
[
# QEMU virtualized GPU (aka VirGL)
# Requires ATOMIC_INT_LOCK_FREE == 2.
"virtio"
],
eglPlatforms ? [
"x11"
"wayland"
],
vulkanLayers ? [
"device-select"
"intel-nullhw"
"overlay"
"screenshot"
"vram-report-limit"
],
mesa,
mesa-gl-headers,
makeSetupHook,
}:
let
rustDeps = lib.importJSON ./wraps.json;
fetchDep =
dep:
fetchCrate {
inherit (dep) pname version hash;
unpack = false;
};
toCommand = dep: "ln -s ${dep} $out/${dep.pname}-${dep.version}.tar.gz";
packageCacheCommand = lib.pipe rustDeps [
(map fetchDep)
(map toCommand)
(lib.concatStringsSep "\n")
];
packageCache = runCommand "mesa-rust-package-cache" { } ''
mkdir -p $out
${packageCacheCommand}
'';
needNativeCLC = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
common = import ./common.nix { inherit lib fetchFromGitLab; };
in
stdenv.mkDerivation {
inherit (common)
pname
version
src
meta
;
patches = [
./opencl.patch
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37027
./gallivm-llvm-21.patch
];
postPatch = ''
patchShebangs .
for header in ${toString mesa-gl-headers.headers}; do
if ! diff -q $header ${mesa-gl-headers}/$header; then
echo "File $header does not match between mesa and mesa-gl-headers, please update mesa-gl-headers first!"
exit 42
fi
done
'';
outputs = [
"out"
# OpenCL drivers pull in ~1G of extra LLVM stuff, so don't install them
# if the user didn't explicitly ask for it
"opencl"
# the Dozen drivers depend on libspirv2dxil, but link it statically, and
# libspirv2dxil itself is pretty chonky, so relocate it to its own output in
# case anything wants to use it at some point
"spirv2dxil"
]
++ lib.optionals (!needNativeCLC) [
# tools for the host platform to be used when cross-compiling.
# mesa builds these only when not already built. hence:
# - for a non-cross build (needNativeCLC = false), we do not provide mesa
# with any `*-clc` binaries, so it builds them and installs them.
# - for a cross build (needNativeCLC = true), we provide mesa with `*-clc`
# binaries, so it skips building & installing any new CLC files.
"cross_tools"
];
# Keep build-ids so drivers can use them for caching, etc.
# Also some drivers segfault without this.
separateDebugInfo = true;
__structuredAttrs = true;
# Needed to discover llvm-config for cross
preConfigure = ''
PATH=${lib.getDev llvmPackages.libllvm}/bin:$PATH
'';
env.MESON_PACKAGE_CACHE_DIR = packageCache;
mesonFlags = [
"--sysconfdir=/etc"
# 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))
# Enable glvnd for dynamic libGL dispatch
(lib.mesonEnable "glvnd" true)
(lib.mesonEnable "gbm" true)
(lib.mesonBool "libgbm-external" true)
(lib.mesonBool "teflon" true) # TensorFlow frontend
# Enable all freedreno kernel mode drivers. (For example, virtio can be
# used with a virtio-gpu device supporting drm native context.) This option
# is ignored when freedreno is not being built.
(lib.mesonOption "freedreno-kmds" "msm,kgsl,virtio,wsl")
# Required for OpenCL
(lib.mesonOption "clang-libdir" "${lib.getLib llvmPackages.clang-unwrapped}/lib")
# Rusticl, new OpenCL frontend
(lib.mesonBool "gallium-rusticl" true)
(lib.mesonOption "gallium-rusticl-enable-drivers" "auto")
# Enable more sensors in gallium-hud
(lib.mesonBool "gallium-extra-hud" true)
# Disable valgrind on targets where it's not available
(lib.mesonEnable "valgrind" withValgrind)
# Enable Intel RT stuff when available
(lib.mesonEnable "intel-rt" (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isAarch64))
# meson auto_features enables these, but we do not want them
(lib.mesonEnable "gallium-mediafoundation" false) # Windows only
(lib.mesonEnable "android-libbacktrace" false) # Android only
(lib.mesonEnable "microsoft-clc" false) # Only relevant on Windows (OpenCL 1.2 API on top of D3D12)
]
++ lib.optionals enablePatentEncumberedCodecs [
(lib.mesonOption "video-codecs" "all")
]
++ lib.optionals (!needNativeCLC) [
# Build and install extra tools for cross
(lib.mesonOption "tools" "asahi,panfrost")
(lib.mesonBool "install-mesa-clc" true)
(lib.mesonBool "install-precomp-compiler" true)
]
++ lib.optionals needNativeCLC [
(lib.mesonOption "mesa-clc" "system")
(lib.mesonOption "precomp-compiler" "system")
];
strictDeps = true;
buildInputs =
with xorg;
[
directx-headers
elfutils
expat
spirv-tools
libdrm
libgbm
libglvnd
libpng
libunwind
libva-minimal
libvdpau
libX11
libxcb
libXext
libXfixes
libXrandr
libxshmfence
libXxf86vm
llvmPackages.clang
llvmPackages.clang-unwrapped
llvmPackages.libclc
llvmPackages.libllvm
lm_sensors
python3Packages.python # for shebang
spirv-llvm-translator
udev
vulkan-loader
wayland
wayland-protocols
xcbutilkeysyms
xorgproto
zstd
]
++ lib.optionals withValgrind [
valgrind-light
];
depsBuildBuild = [
pkg-config
buildPackages.stdenv.cc
];
nativeBuildInputs = [
meson
pkg-config
ninja
intltool
bison
flex
file
python3Packages.python
python3Packages.packaging
python3Packages.pycparser
python3Packages.mako
python3Packages.ply
python3Packages.pyyaml
jdupes
# Use bin output from glslang to not propagate the dev output at
# the build time with the host glslang.
(lib.getBin glslang)
rustc
rust-bindgen
rust-cbindgen
wayland-scanner
]
++ lib.optionals needNativeCLC [
# `or null` to not break eval with `attribute missing` on darwin to linux cross
(buildPackages.mesa.cross_tools or null)
];
disallowedRequisites = lib.optional (
needNativeCLC && buildPackages.mesa ? cross_tools
) buildPackages.mesa.cross_tools;
doCheck = false;
postInstall = ''
moveToOutput bin/asahi_clc $cross_tools
moveToOutput bin/intel_clc $cross_tools
moveToOutput bin/mesa_clc $cross_tools
moveToOutput bin/panfrost_compile $cross_tools
moveToOutput bin/panfrost_texfeatures $cross_tools
moveToOutput bin/panfrostdump $cross_tools
moveToOutput bin/vtn_bindgen2 $cross_tools
moveToOutput "lib/lib*OpenCL*" $opencl
# Construct our own .icd file that contains an absolute path.
mkdir -p $opencl/etc/OpenCL/vendors/
echo $opencl/lib/libRusticlOpenCL.so > $opencl/etc/OpenCL/vendors/rusticl.icd
moveToOutput bin/spirv2dxil $spirv2dxil
moveToOutput "lib/libspirv_to_dxil*" $spirv2dxil
'';
postFixup = ''
# set full path in EGL driver manifest
for js in $out/share/glvnd/egl_vendor.d/*.json; do
substituteInPlace "$js" --replace-fail '"libEGL_' '"'"$out/lib/libEGL_"
done
# and in Vulkan layer manifests
for js in $out/share/vulkan/{im,ex}plicit_layer.d/*.json; do
substituteInPlace "$js" --replace '"libVkLayer_' '"'"$out/lib/libVkLayer_"
done
# remove DRI pkg-config file, provided by dri-pkgconfig-stub
rm -f $out/lib/pkgconfig/dri.pc
# remove headers moved to mesa-gl-headers
for header in ${toString mesa-gl-headers.headers}; do
rm -f $out/$header
done
# clean up after removing stuff
find $out -type d -empty -delete
# Don't depend on build python
patchShebangs --host --update $out/bin/*
# NAR doesn't support hard links, so convert them to symlinks to save space.
jdupes --hard-links --link-soft --recurse "$out"
# add RPATH here so Zink can find libvulkan.so
patchelf --add-rpath ${vulkan-loader}/lib $out/lib/libgallium*.so
'';
passthru = {
inherit (libglvnd) driverLink;
inherit llvmPackages;
inherit
eglPlatforms
galliumDrivers
vulkanDrivers
vulkanLayers
;
# for compatibility
drivers = lib.warn "`mesa.drivers` is deprecated, use `mesa` instead" mesa;
tests.outDoesNotDependOnLLVM = stdenv.mkDerivation {
name = "mesa-does-not-depend-on-llvm";
buildCommand = ''
echo ${mesa} >>$out
'';
disallowedRequisites = [ llvmPackages.llvm ];
};
llvmpipeHook = makeSetupHook {
name = "llvmpipe-hook";
substitutions.mesa = mesa;
} ./llvmpipe-hook.sh;
};
}

View File

@@ -0,0 +1,53 @@
From eca19331d94005485de5246cfa87a21621486cd8 Mon Sep 17 00:00:00 2001
From: no92 <no92.mail@gmail.com>
Date: Wed, 27 Aug 2025 16:02:31 +0200
Subject: [PATCH] gallivm: support LLVM 21
LLVM PR#146819 changed the signature of `setObjectLinkingLayerCreator`,
dropping the Triple argument. The PR was first included in the LLVM 21
series, and the new signature is gated behind a version check for that.
`LLVMOrcThreadSafeContextGetContext` was removed in LLVM commit b18e5b6,
and the ORC examples in the LLVM tree seem to just create a context
instead, which we replicate here.
With this commit, mesa successfully builds the llvmpipe gallium driver
on riscv64 with LLVM 21.1.0.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13785
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852
Reviewed-by: David Heidelberg <david@ixit.cz>
---
src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
index 3d2b8cf81bc0c..0be69b02b6eef 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
@@ -340,7 +340,12 @@ LPJit::LPJit() :jit_dylib_count(0) {
.setJITTargetMachineBuilder(std::move(JTMB))
#ifdef USE_JITLINK
.setObjectLinkingLayerCreator(
+#if LLVM_VERSION_MAJOR >= 21
+ /* LLVM 21 removed the Triple argument */
+ [&](ExecutionSession &ES) {
+#else
[&](ExecutionSession &ES, const llvm::Triple &TT) {
+#endif
return std::make_unique<ObjectLinkingLayer>(
ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
})
@@ -552,7 +557,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
gallivm->cache = cache;
gallivm->_ts_context = context->ref;
- gallivm->context = LLVMOrcThreadSafeContextGetContext(context->ref);
+ gallivm->context = LLVMContextCreate();
gallivm->module_name = LPJit::get_unique_name(name);
gallivm->module = LLVMModuleCreateWithNameInContext(gallivm->module_name,
--
GitLab

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchFromGitLab,
libglvnd,
bison,
flex,
meson,
pkg-config,
ninja,
python3Packages,
libdrm,
}:
let
common = import ./common.nix { inherit lib fetchFromGitLab; };
in
stdenv.mkDerivation rec {
pname = "mesa-libgbm";
# We don't use the versions from common.nix, because libgbm is a world rebuild,
# so the updates need to happen separately on staging.
version = "25.1.0";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "mesa";
rev = "mesa-${version}";
hash = "sha256-UlI+6OMUj5F6uVAw+Mg2wOZrjfdRq73d1qufaXVI/go";
};
mesonAutoFeatures = "disabled";
mesonFlags = [
"--sysconfdir=/etc"
(lib.mesonEnable "gbm" true)
(lib.mesonOption "gbm-backends-path" "${libglvnd.driverLink}/lib/gbm")
(lib.mesonEnable "egl" false)
(lib.mesonEnable "glx" false)
(lib.mesonEnable "zlib" false)
(lib.mesonOption "platforms" "")
(lib.mesonOption "gallium-drivers" "")
(lib.mesonOption "vulkan-drivers" "")
(lib.mesonOption "vulkan-layers" "")
];
strictDeps = true;
propagatedBuildInputs = [ libdrm ];
nativeBuildInputs = [
bison
flex
meson
pkg-config
ninja
python3Packages.packaging
python3Packages.python
python3Packages.mako
python3Packages.pyyaml
];
inherit (common) meta;
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitLab,
}:
let
common = import ./common.nix { inherit lib fetchFromGitLab; };
headers = [
"include/GL/internal/dri_interface.h"
"include/EGL/eglext_angle.h"
"include/EGL/eglmesaext.h"
];
in
stdenv.mkDerivation rec {
pname = "mesa-gl-headers";
# These are a bigger rebuild and don't change often, so keep them separate.
version = "25.1.0";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "mesa";
rev = "mesa-${version}";
hash = "sha256-UlI+6OMUj5F6uVAw+Mg2wOZrjfdRq73d1qufaXVI/go";
};
dontBuild = true;
installPhase = ''
for header in ${toString headers}; do
install -Dm444 $header $out/$header
done
'';
passthru = { inherit headers; };
inherit (common) meta;
}

View File

@@ -0,0 +1,28 @@
# shellcheck shell=bash
# Mesa: force software rendering
# https://docs.mesa3d.org/envvars.html
export LIBGL_ALWAYS_SOFTWARE=true
export LIBGL_DRIVERS_PATH=@mesa@/lib/dri
# GLX
# glvnd just does dlopen("libGLX_%s.so"), so we have to resort to
# LD_LIBRARY_PATH, which is bad but what can you do.
# FIXME: maybe change glvnd to allow specifying this properly
export LD_LIBRARY_PATH=@mesa@/lib:${LD_LIBRARY_PATH:-}
export __GLX_VENDOR_LIBRARY_NAME=mesa
# EGL
# https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md
export __EGL_VENDOR_LIBRARY_FILENAMES=@mesa@/share/glvnd/egl_vendor.d/50_mesa.json
# GBM
export GBM_BACKENDS_PATH=@mesa@/lib/gbm
export GBM_BACKEND=dri
# Vulkan
# https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md
# glob because the filenames contain an architecture suffix
# echo is needed to force-expand the glob
VK_DRIVER_FILES="$(echo @mesa@/share/vulkan/icd.d/lvp_icd.*.json)"
export VK_DRIVER_FILES

View File

@@ -0,0 +1,41 @@
diff --git a/meson.build b/meson.build
index 393f3ac1b93..fbc90b5645e 100644
--- a/meson.build
+++ b/meson.build
@@ -1836,7 +1836,7 @@ endif
dep_clang = null_dep
if with_clc
- llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
+ llvm_libdir = get_option('clang-libdir')
dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
diff --git a/meson.options b/meson.options
index b1cdb06fcc9..3e8861979ae 100644
--- a/meson.options
+++ b/meson.options
@@ -856,3 +856,10 @@ option(
value : false,
description : 'Build virtgpu_kumquat (only useful with gfxstream currently)'
)
+
+option(
+ 'clang-libdir',
+ type : 'string',
+ value : '',
+ description : 'Locations to search for clang libraries.'
+)
diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build
index 2b214adbbf5..7f919397ad5 100644
--- a/src/gallium/targets/rusticl/meson.build
+++ b/src/gallium/targets/rusticl/meson.build
@@ -64,7 +64,7 @@ configure_file(
configuration : _config,
input : 'rusticl.icd.in',
output : 'rusticl.icd',
- install : true,
+ install : false,
install_tag : 'runtime',
install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
)

View File

@@ -0,0 +1,50 @@
import base64
import binascii
import configparser
import json
import pathlib
import sys
import urllib.parse
def to_sri(hash: str):
raw = binascii.unhexlify(hash)
b64 = base64.b64encode(raw).decode()
return f"sha256-{b64}"
def main(dir: str):
result = []
for file in (pathlib.Path(dir) / "subprojects").glob("*.wrap"):
name = file.stem
parser = configparser.ConfigParser()
_ = parser.read(file)
sections = parser.sections()
if "wrap-file" not in sections:
continue
url = parser.get("wrap-file", "source_url")
if "crates.io" not in url:
continue
parsed = urllib.parse.urlparse(url)
path = parsed.path.split("/")
assert path[4] == name
version = path[5]
hash = to_sri(parser.get("wrap-file", "source_hash"))
result.append({
"pname": name,
"version": version,
"hash": hash,
})
here = pathlib.Path(__file__).parent
with (here / "wraps.json").open("w") as fd:
json.dump(result, fd, indent=4)
_ = fd.write("\n")
if __name__ == '__main__':
main(*sys.argv[1:])

View File

@@ -0,0 +1,137 @@
[
{
"pname": "errno",
"version": "0.3.12",
"hash": "sha256-zqFO+TVeO+qwY3A6qdqxWv0l8GZ8NBMQweUnS7HQ2hg="
},
{
"pname": "quote",
"version": "1.0.35",
"hash": "sha256-KR7Jq179k0qvUDpkZsXVJRU10QjudHRyw5d8xazIaO8="
},
{
"pname": "pest",
"version": "2.8.0",
"hash": "sha256-GY23RTHVjHCjYcQiAe/efiWR6XbVGMr3ZipH3Fcg57Y="
},
{
"pname": "equivalent",
"version": "1.0.1",
"hash": "sha256-VEOAfW3/aTc9Qzq571N4rY31DKYpjK8V3m5S4kqvVNU="
},
{
"pname": "syn",
"version": "2.0.87",
"hash": "sha256-JapM40bQOm3NaN2LQBC8t05U5iyQxXPzlMRurpmroy0="
},
{
"pname": "remain",
"version": "0.2.12",
"hash": "sha256-GtXgESMMrSdNBTJGDFq2mCjqR651aBtCqEFmPv/695Q="
},
{
"pname": "unicode-ident",
"version": "1.0.12",
"hash": "sha256-M1S5rD+uH/Z1XLbbU2g622YWNPZ1V5Qt6k+s6+wP7ks="
},
{
"pname": "cfg-if",
"version": "1.0.0",
"hash": "sha256-uvHeQzl2FYi8Bhnjy8ASDuWC67dLU7Tvv3kRe9LaQP0="
},
{
"pname": "bitflags",
"version": "2.9.1",
"hash": "sha256-G45WmF7GLRfpwQAdyJyI7NfcCOR+ul7Hwpx7Xu7N6Wc="
},
{
"pname": "pest_derive",
"version": "2.8.0",
"hash": "sha256-1yXZz9eeh9zMk0Gi7znRtvY1PWjEszwXf+u+GkAsl8U="
},
{
"pname": "rustc-hash",
"version": "2.1.1",
"hash": "sha256-NXcD1BNltLJ8WQ4+2R6rsbZj8HxMCECV5gy+1DYt/w0="
},
{
"pname": "ucd-trie",
"version": "0.1.6",
"hash": "sha256-7WRikv/IGI746k0eDgFQ+xWlwuEq2bj8GRrnqKfzxLk="
},
{
"pname": "indexmap",
"version": "2.2.6",
"hash": "sha256-Fo+3Fd2kchXjYJEsCWZJ0j1Yvzkqxi9zkZ6DF0XkDyY="
},
{
"pname": "paste",
"version": "1.0.14",
"hash": "sha256-3jFFrwgCTeqfqZFPOBoXuPxgNN+wDzqEAT9/9D8p7Uw="
},
{
"pname": "hashbrown",
"version": "0.14.1",
"hash": "sha256-ff2mKhL1Xa6uUBX4GwuuoUU5HLRSD4bCSPxhXXJkDRI="
},
{
"pname": "libc",
"version": "0.2.168",
"hash": "sha256-Wq6ymB4GBsoR15cY+LsBFk8dbtdQgBgtOr8Bfm0kS20="
},
{
"pname": "thiserror-impl",
"version": "2.0.11",
"hash": "sha256-Jq/BuuqKmJM37rUrbnKgOXgM5Fw+38ycW50RL+6xc8I="
},
{
"pname": "once_cell",
"version": "1.8.0",
"hash": "sha256-aS/LY7ZLF1gCngqW7mPgSc6MWUhYfy9yCN8EYl5fa1Y="
},
{
"pname": "rustix",
"version": "1.0.7",
"hash": "sha256-xx6D1q/n/2SJDsa3HWppu4phCreM42SzNSh2u0yAEmY="
},
{
"pname": "pest_generator",
"version": "2.8.0",
"hash": "sha256-230Bcmvoq2arMvnfRnrosRSJBmhbvnXILR5l1/Wz+EE="
},
{
"pname": "thiserror",
"version": "2.0.11",
"hash": "sha256-1FLyhLc+bXbdNnWKDIaEsdW+MfkridB/1YIhdXMiBvw="
},
{
"pname": "proc-macro2",
"version": "1.0.86",
"hash": "sha256-XnGejfZl3w0cj7/SOAFXRHNhUdREXsCDa45iiq4QO3c="
},
{
"pname": "zerocopy",
"version": "0.8.13",
"hash": "sha256-Z5FKtFHzv9Lmnl6dLvOFhITnB01j8gT9Fm7DkbVN4h0="
},
{
"pname": "roxmltree",
"version": "0.20.0",
"hash": "sha256-bCC2eTtcL6ZVOyUBVLeNbQ2zfnJwCuNfrZOHpG9IfJc="
},
{
"pname": "zerocopy-derive",
"version": "0.8.13",
"hash": "sha256-eYjXOkMDyiid8DMWvEkOk0rM83Gva8dFOTzzwsXE8l0="
},
{
"pname": "pest_meta",
"version": "2.8.0",
"hash": "sha256-f5+DJHBJSQbR/KUyn4q1eRzGC+sjDHSBXf9UHL0rXKA="
},
{
"pname": "log",
"version": "0.4.27",
"hash": "sha256-E9wt81HjICeDof4NRDdfcpX/tASSZ7DzAYNG3BIqHZQ="
}
]