bsc: remove axv2 when building on non x86 system

This commit is contained in:
wxt 2024-11-08 20:37:16 +08:00
parent 9f1f987c19
commit d339f93f32
No known key found for this signature in database
GPG Key ID: 8281D5EE2D1825A4

View File

@ -20,17 +20,25 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
postPatch = lib.optional (!stdenv.hostPlatform.isx86) ''
substituteInPlace makefile \
--replace-fail "-mavx2" ""
substituteInPlace makefile.cuda \
--replace-fail "-mavx2" ""
'';
makeFlags = [
"CC=$(CXX)"
"PREFIX=${placeholder "out"}"
];
meta = with lib; {
meta = {
description = "High performance block-sorting data compression library";
homepage = "http://libbsc.com/";
maintainers = with maintainers; [ sigmanificient ];
maintainers = with lib.maintainers; [ sigmanificient ];
license = lib.licenses.asl20;
platforms = platforms.unix;
platforms = lib.platforms.unix;
mainProgram = "bsc";
};
})