Merge pull request #199261 from wegank/b2sum-aarch64

b2sum: fix build on aarch64 platforms
This commit is contained in:
Christian Kögler 2022-11-05 21:56:47 +01:00 committed by GitHub
commit 1c8776987e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,13 @@ stdenv.mkDerivation {
sha256 = "E60M9oP/Sdfg/L3ZxUcDtUXhFz9oP72IybdtVUJh9Sk=";
};
# Use the generic C implementation rather than the SSE optimised version on non-x86 platforms
postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
substituteInPlace makefile \
--replace "#FILES=b2sum.c ../ref/" "FILES=b2sum.c ../ref/" \
--replace "FILES=b2sum.c ../sse/" "#FILES=b2sum.c ../sse/"
'';
sourceRoot = "source/b2sum";
buildInputs = [ openmp ];
@ -25,7 +32,6 @@ stdenv.mkDerivation {
homepage = "https://blake2.net";
license = with licenses; [ asl20 cc0 openssl ];
maintainers = with maintainers; [ kirelagin ];
# "This code requires at least SSE2."
platforms = [ "x86_64-linux" "i686-linux" ] ++ platforms.darwin;
platforms = platforms.unix;
};
}