lol

rustc-demangle: replace patch with Cargo.lock

https://github.com/NixOS/nixpkgs/pull/217084 plans to migrate Rust packages to use `importCargoLock`, but the migration script cannot handle `cargoPatches`: https://github.com/NixOS/nixpkgs/pull/217084#discussion_r1111253151

figsoda c52479ef a1970c01

+76 -77
+67
pkgs/development/libraries/rustc-demangle/Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 3 4 + 5 + [[package]] 6 + name = "arbitrary" 7 + version = "1.0.1" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "237430fd6ed3740afe94eefcc278ae21e050285be882804e0d6e8695f0c94691" 10 + 11 + [[package]] 12 + name = "cc" 13 + version = "1.0.69" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" 16 + 17 + [[package]] 18 + name = "compiler_builtins" 19 + version = "0.1.49" 20 + source = "registry+https://github.com/rust-lang/crates.io-index" 21 + checksum = "20b1438ef42c655665a8ab2c1c6d605a305f031d38d9be689ddfef41a20f3aa2" 22 + 23 + [[package]] 24 + name = "libfuzzer-sys" 25 + version = "0.4.2" 26 + source = "registry+https://github.com/rust-lang/crates.io-index" 27 + checksum = "36a9a84a6e8b55dfefb04235e55edb2b9a2a18488fcae777a6bdaa6f06f1deb3" 28 + dependencies = [ 29 + "arbitrary", 30 + "cc", 31 + "once_cell", 32 + ] 33 + 34 + [[package]] 35 + name = "once_cell" 36 + version = "1.8.0" 37 + source = "registry+https://github.com/rust-lang/crates.io-index" 38 + checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 39 + 40 + [[package]] 41 + name = "rustc-demangle" 42 + version = "0.1.20" 43 + dependencies = [ 44 + "compiler_builtins", 45 + "rustc-std-workspace-core", 46 + ] 47 + 48 + [[package]] 49 + name = "rustc-demangle-capi" 50 + version = "0.1.0" 51 + dependencies = [ 52 + "rustc-demangle", 53 + ] 54 + 55 + [[package]] 56 + name = "rustc-demangle-fuzz" 57 + version = "0.0.0" 58 + dependencies = [ 59 + "libfuzzer-sys", 60 + "rustc-demangle", 61 + ] 62 + 63 + [[package]] 64 + name = "rustc-std-workspace-core" 65 + version = "1.0.0" 66 + source = "registry+https://github.com/rust-lang/crates.io-index" 67 + checksum = "1956f5517128a2b6f23ab2dadf1a976f4f5b27962e7724c2bf3d45e539ec098c"
-73
pkgs/development/libraries/rustc-demangle/add-Cargo.lock.patch
··· 1 - diff --git a/Cargo.lock b/Cargo.lock 2 - new file mode 100644 3 - index 0000000..0268b3b 4 - --- /dev/null 5 - +++ b/Cargo.lock 6 - @@ -0,0 +1,67 @@ 7 - +# This file is automatically @generated by Cargo. 8 - +# It is not intended for manual editing. 9 - +version = 3 10 - + 11 - +[[package]] 12 - +name = "arbitrary" 13 - +version = "1.0.1" 14 - +source = "registry+https://github.com/rust-lang/crates.io-index" 15 - +checksum = "237430fd6ed3740afe94eefcc278ae21e050285be882804e0d6e8695f0c94691" 16 - + 17 - +[[package]] 18 - +name = "cc" 19 - +version = "1.0.69" 20 - +source = "registry+https://github.com/rust-lang/crates.io-index" 21 - +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" 22 - + 23 - +[[package]] 24 - +name = "compiler_builtins" 25 - +version = "0.1.49" 26 - +source = "registry+https://github.com/rust-lang/crates.io-index" 27 - +checksum = "20b1438ef42c655665a8ab2c1c6d605a305f031d38d9be689ddfef41a20f3aa2" 28 - + 29 - +[[package]] 30 - +name = "libfuzzer-sys" 31 - +version = "0.4.2" 32 - +source = "registry+https://github.com/rust-lang/crates.io-index" 33 - +checksum = "36a9a84a6e8b55dfefb04235e55edb2b9a2a18488fcae777a6bdaa6f06f1deb3" 34 - +dependencies = [ 35 - + "arbitrary", 36 - + "cc", 37 - + "once_cell", 38 - +] 39 - + 40 - +[[package]] 41 - +name = "once_cell" 42 - +version = "1.8.0" 43 - +source = "registry+https://github.com/rust-lang/crates.io-index" 44 - +checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 45 - + 46 - +[[package]] 47 - +name = "rustc-demangle" 48 - +version = "0.1.20" 49 - +dependencies = [ 50 - + "compiler_builtins", 51 - + "rustc-std-workspace-core", 52 - +] 53 - + 54 - +[[package]] 55 - +name = "rustc-demangle-capi" 56 - +version = "0.1.0" 57 - +dependencies = [ 58 - + "rustc-demangle", 59 - +] 60 - + 61 - +[[package]] 62 - +name = "rustc-demangle-fuzz" 63 - +version = "0.0.0" 64 - +dependencies = [ 65 - + "libfuzzer-sys", 66 - + "rustc-demangle", 67 - +] 68 - + 69 - +[[package]] 70 - +name = "rustc-std-workspace-core" 71 - +version = "1.0.0" 72 - +source = "registry+https://github.com/rust-lang/crates.io-index" 73 - +checksum = "1956f5517128a2b6f23ab2dadf1a976f4f5b27962e7724c2bf3d45e539ec098c"
+9 -4
pkgs/development/libraries/rustc-demangle/default.nix
··· 11 11 sha256 = "sha256-elxclyuLmr3N66s+pR4/6OU98k1oXI2wKVJtzWPY8FI="; 12 12 }; 13 13 14 - cargoPatches = [ 14 + cargoLock = { 15 15 # generated using `cargo generate-lockfile` since repo is missing lockfile 16 - ./add-Cargo.lock.patch 17 - ]; 18 - cargoSha256 = "sha256-1tW5TOap5MstxTXAFij3IB8TIpI+FryEX9TXlVXjRl4="; 16 + lockFile = ./Cargo.lock; 17 + }; 18 + 19 19 cargoBuildFlags = [ "-p" "rustc-demangle-capi" ]; 20 + 21 + postPatch = '' 22 + ln -s ${./Cargo.lock} Cargo.lock 23 + ''; 24 + 20 25 postInstall = '' 21 26 mkdir -p $out/lib 22 27 cp target/${rust.toRustTargetSpec stdenv.hostPlatform}/release/librustc_demangle.so $out/lib