texture-synthesis: fix build with rust 1.76+

- add patch updating rustc-serialize, new version includes:
https://www.github.com/rust-lang-deprecated/rustc-serialize/pull/200
- use `fetchCargoVendor` to remove `Cargo.lock`
- switch `sha256` to `hash` in `src`
This commit is contained in:
ghpzin
2025-03-23 16:22:19 +03:00
parent 03bd4750d6
commit 4228dfd529
3 changed files with 26 additions and 1201 deletions
File diff suppressed because it is too large Load Diff
+10 -7
View File
@@ -13,15 +13,18 @@ rustPlatform.buildRustPackage rec {
owner = "embarkstudios";
repo = "texture-synthesis";
rev = version;
sha256 = "0n1wbxcnxb7x5xwakxdzq7kg1fn0c48i520j03p7wvm5x97vm5h4";
hash = "sha256-BJa6T+qlbn7uABKIEhFhwLrw5sG/9al4L/2sbllfPFg=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"img_hash-2.1.0" = "sha256-Ba26n//bZweYvb5p47U209dHrsDHKHLQ3YEHbKT+hjE=";
};
};
useFetchCargoVendor = true;
cargoHash = "sha256-4EBMl5yvteoot6/r0tTZ95MQ6HGqgBzlRWClnlyqz/M=";
cargoPatches = [
# fix build with rust 1.76+
# https://github.com/rust-lang/rust/pull/117984
# https://github.com/rust-lang-deprecated/rustc-serialize/pull/200
./update-rustc-serialize.patch
];
# tests fail for unknown reasons on aarch64-darwin
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64);
@@ -0,0 +1,16 @@
diff --git a/Cargo.lock b/Cargo.lock
index 424314c..eb80a7e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -781,9 +781,9 @@ dependencies = [
[[package]]
name = "rustc-serialize"
-version = "0.3.24"
+version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
+checksum = "fe834bc780604f4674073badbad26d7219cadfb4a2275802db12cbae17498401"
[[package]]
name = "rustc_version"