srsran: fix CPU option selection, split output (#376963)

Changed files
+20 -1
pkgs
by-name
sr
srsran
+20 -1
pkgs/by-name/sr/srsran/package.nix
···
soapysdr-with-plugins,
libbladeRF,
zeromq,
+
enableAvx ? stdenv.hostPlatform.avxSupport,
+
enableAvx2 ? stdenv.hostPlatform.avx2Support,
+
enableFma ? stdenv.hostPlatform.fmaSupport,
+
enableAvx512 ? stdenv.hostPlatform.avx512Support,
}:
stdenv.mkDerivation rec {
···
sha256 = "sha256-3cQMZ75I4cyHpik2d/eBuzw7M4OgbKqroCddycw4uW8=";
};
+
outputs = [
+
"out"
+
"dev"
+
];
+
nativeBuildInputs = [
cmake
pkg-config
···
zeromq
];
-
cmakeFlags = [ "-DENABLE_WERROR=OFF" ];
+
cmakeFlags = [
+
"-DENABLE_WERROR=OFF"
+
(lib.cmakeBool "ENABLE_AVX" enableAvx)
+
(lib.cmakeBool "ENABLE_AVX2" enableAvx2)
+
(lib.cmakeBool "ENABLE_FMA" enableFma)
+
(lib.cmakeBool "ENABLE_AVX512" enableAvx512)
+
];
+
+
postInstall = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
+
rm $out/lib/*.a
+
'';
meta = with lib; {
homepage = "https://www.srslte.com/";