kind2: fix build

This commit is contained in:
figsoda 2023-07-03 22:30:31 -04:00
parent e0ca6a14de
commit 40d8e0c429

View File

@ -3,7 +3,6 @@
, fetchCrate
, stdenv
, darwin
, fetchpatch
}:
rustPlatform.buildRustPackage rec {
@ -21,33 +20,6 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk_11_0.frameworks.Security
];
postPatch =
let
hvmPatch = fetchpatch {
name = "revert-fix-remove-feature-automic-mut-ptr.patch";
url = "https://github.com/higherorderco/hvm/commit/c0e35c79b4e31c266ad33beadc397c428e4090ee.patch";
hash = "sha256-9xxu7NOtz3Tuzf5F0Mi4rw45Xnyh7h9hbTrzq4yfslg=";
revert = true;
};
in
''
pushd $cargoDepsCopy/hvm
oldLibHash=$(sha256sum src/lib.rs | cut -d " " -f 1)
oldMainHash=$(sha256sum src/main.rs | cut -d " " -f 1)
patch -p1 < ${hvmPatch}
newLibHash=$(sha256sum src/lib.rs | cut -d " " -f 1)
newMainHash=$(sha256sum src/main.rs | cut -d " " -f 1)
substituteInPlace .cargo-checksum.json \
--replace "$oldLibHash" "$newLibHash" \
--replace "$oldMainHash" "$newMainHash"
popd
'';
# requires nightly features
RUSTC_BOOTSTRAP = true;