LPCNet: unbreak on clang (#403639)

authored by Doron Behar and committed by GitHub a04b9772 01e6f137

+37 -9
+37 -9
pkgs/by-name/lp/LPCNet/package.nix
··· 7 codec2, 8 # for tests 9 octave, 10 }: 11 12 stdenv.mkDerivation (finalAttrs: { ··· 16 src = fetchFromGitHub { 17 owner = "drowe67"; 18 repo = "LPCNet"; 19 - rev = "v${finalAttrs.version}"; 20 hash = "sha256-tHZLKXmuM86A6OpfS3CRRjhFbqj1Q/w1w56msdgLHb0="; 21 }; 22 passthru = { 23 # Prebuilt neural network model that is needed during the build - can be overwritten 24 nnmodel = fetchurl { ··· 26 hash = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg="; 27 }; 28 }; 29 preConfigure = '' 30 mkdir build 31 cp \ ··· 37 patchShebangs *.sh unittest/*.sh 38 ''; 39 40 - nativeBuildInputs = [ cmake ]; 41 - buildInputs = [ codec2 ]; 42 - nativeCheckInputs = [ octave ]; 43 44 doCheck = true; 45 - preCheck = '' 46 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}/build/source/build/src" 47 ''; 48 49 - meta = with lib; { 50 description = "Experimental Neural Net speech coding for FreeDV"; 51 homepage = "https://github.com/drowe67/LPCNet"; 52 - license = licenses.bsd3; 53 - maintainers = with maintainers; [ doronbehar ]; 54 - platforms = platforms.all; 55 }; 56 })
··· 7 codec2, 8 # for tests 9 octave, 10 + sox, 11 }: 12 13 stdenv.mkDerivation (finalAttrs: { ··· 17 src = fetchFromGitHub { 18 owner = "drowe67"; 19 repo = "LPCNet"; 20 + tag = "v${finalAttrs.version}"; 21 hash = "sha256-tHZLKXmuM86A6OpfS3CRRjhFbqj1Q/w1w56msdgLHb0="; 22 }; 23 + 24 passthru = { 25 # Prebuilt neural network model that is needed during the build - can be overwritten 26 nnmodel = fetchurl { ··· 28 hash = "sha256-UJRAkkdR/dh/+qVoPuPd3ZN69cgzuRBMzOZdUWFJJsg="; 29 }; 30 }; 31 + 32 preConfigure = '' 33 mkdir build 34 cp \ ··· 40 patchShebangs *.sh unittest/*.sh 41 ''; 42 43 + nativeBuildInputs = [ 44 + cmake 45 + ]; 46 + 47 + buildInputs = [ 48 + codec2 49 + ]; 50 + 51 + cmakeFlags = lib.optionals (stdenv.cc.isClang && stdenv.hostPlatform.isAarch64) [ 52 + # unsupported option '-mfpu=' for target 'x86_64-apple-darwin' 53 + "-DNEON=OFF" 54 + ]; 55 + 56 + nativeCheckInputs = [ 57 + octave 58 + sox 59 + ]; 60 + 61 + disabledTests = lib.optionals (stdenv.cc.isClang && stdenv.hostPlatform.isAarch64) [ 62 + # disable tests that require NEON 63 + "SIMD_functions" 64 + ]; 65 66 doCheck = true; 67 + checkPhase = '' 68 + runHook preCheck 69 + 70 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}/build/source/build/src" 71 + 72 + ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$' 73 + 74 + runHook postCheck 75 ''; 76 77 + meta = { 78 description = "Experimental Neural Net speech coding for FreeDV"; 79 homepage = "https://github.com/drowe67/LPCNet"; 80 + license = lib.licenses.bsd3; 81 + maintainers = with lib.maintainers; [ doronbehar ]; 82 + platforms = lib.platforms.all; 83 }; 84 })