mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
LPCNet: unbreak on clang (#403639)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
codec2,
|
||||
# for tests
|
||||
octave,
|
||||
sox,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -16,9 +17,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "drowe67";
|
||||
repo = "LPCNet";
|
||||
rev = "v${finalAttrs.version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-tHZLKXmuM86A6OpfS3CRRjhFbqj1Q/w1w56msdgLHb0=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
# Prebuilt neural network model that is needed during the build - can be overwritten
|
||||
nnmodel = fetchurl {
|
||||
@@ -26,6 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg=";
|
||||
};
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
mkdir build
|
||||
cp \
|
||||
@@ -37,20 +40,45 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
patchShebangs *.sh unittest/*.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ codec2 ];
|
||||
nativeCheckInputs = [ octave ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
codec2
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optionals (stdenv.cc.isClang && stdenv.hostPlatform.isAarch64) [
|
||||
# unsupported option '-mfpu=' for target 'x86_64-apple-darwin'
|
||||
"-DNEON=OFF"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
octave
|
||||
sox
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (stdenv.cc.isClang && stdenv.hostPlatform.isAarch64) [
|
||||
# disable tests that require NEON
|
||||
"SIMD_functions"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}/build/source/build/src"
|
||||
|
||||
ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$'
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Experimental Neural Net speech coding for FreeDV";
|
||||
homepage = "https://github.com/drowe67/LPCNet";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user