more patches
This commit is contained in:
1 parent
5ba86fdaea
commit
13fb3d426b
11 files changed
+208
No files matched your search
@@ -0,0 +1,21 @@
|
||||
{ trunk, jq }:
|
||||
trunk.overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ jq ];
|
||||
|
||||
# Patch the bundled libdeflate before Cargo validates its vendor checksums.
|
||||
postPatch = (old.postPatch or "") + ''
|
||||
libdeflateVendors=( "$cargoDepsCopy"/source-*/libdeflate-sys-1.23.1 )
|
||||
if [ "''${#libdeflateVendors[@]}" -ne 1 ] || [ ! -d "''${libdeflateVendors[0]}" ]; then
|
||||
echo "Expected exactly one vendored libdeflate-sys 1.23.1" >&2
|
||||
exit 1
|
||||
fi
|
||||
libdeflateVendor="''${libdeflateVendors[0]}"
|
||||
patch -d "$libdeflateVendor/libdeflate" -p1 < ${./libdeflate-gcc16.patch}
|
||||
libdeflateHeader=libdeflate/lib/x86/cpu_features.h
|
||||
libdeflateChecksum=$(sha256sum "$libdeflateVendor/$libdeflateHeader" | cut -d ' ' -f 1)
|
||||
jq --arg path "$libdeflateHeader" --arg hash "$libdeflateChecksum" \
|
||||
'.files[$path] = $hash' "$libdeflateVendor/.cargo-checksum.json" \
|
||||
> "$libdeflateVendor/.cargo-checksum.json.new"
|
||||
mv "$libdeflateVendor/.cargo-checksum.json.new" "$libdeflateVendor/.cargo-checksum.json"
|
||||
'';
|
||||
})
|
||||
Reference in new issue
Block a user