Skip to content

Commit d339f93

Browse files
committed
bsc: remove axv2 when building on non x86 system
1 parent 9f1f987 commit d339f93

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

pkgs/by-name/bs/bsc/package.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,25 @@ stdenv.mkDerivation (finalAttrs: {
2020

2121
buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
2222

23+
postPatch = lib.optional (!stdenv.hostPlatform.isx86) ''
24+
substituteInPlace makefile \
25+
--replace-fail "-mavx2" ""
26+
27+
substituteInPlace makefile.cuda \
28+
--replace-fail "-mavx2" ""
29+
'';
30+
2331
makeFlags = [
2432
"CC=$(CXX)"
2533
"PREFIX=${placeholder "out"}"
2634
];
2735

28-
meta = with lib; {
36+
meta = {
2937
description = "High performance block-sorting data compression library";
3038
homepage = "http://libbsc.com/";
31-
maintainers = with maintainers; [ sigmanificient ];
39+
maintainers = with lib.maintainers; [ sigmanificient ];
3240
license = lib.licenses.asl20;
33-
platforms = platforms.unix;
41+
platforms = lib.platforms.unix;
3442
mainProgram = "bsc";
3543
};
3644
})

0 commit comments

Comments
 (0)