Merge pull request #160152 from hexagonal-sun/volk-fix-aarch64

This commit is contained in:
Sandro 2022-02-17 00:36:38 +01:00 committed by GitHub
commit 4c6fb45925
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@
, python3
, enableModTool ? true
, removeReferencesTo
, fetchpatch
}:
stdenv.mkDerivation rec {
@ -19,6 +20,14 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/macports/macports-ports/e83a55ef196d4283be438c052295b2fc44f3df5b/science/volk/files/patch-cpu_features-add-support-for-ARM64.diff";
sha256 = "sha256-MNUntVvKZC4zuQsxGQCItaUaaQ1d31re2qjyPFbySmI=";
extraPrefix = "";
})
];
cmakeFlags = lib.optionals (!enableModTool) [ "-DENABLE_MODTOOL=OFF" ];
postInstall = lib.optionalString (!stdenv.isDarwin) ''
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)