5 , freedvSupport ? false
10 stdenv.mkDerivation rec {
14 src = fetchFromGitHub {
18 hash = "sha256-Q5p6NicwmHBR7drX8Tdgf6Mruqssg9qzMC9sG9DlMbQ=";
21 nativeBuildInputs = [ cmake ];
23 buildInputs = lib.optionals freedvSupport [
27 # Install a binary that is used by openwebrx
29 install -Dm0755 src/freedv_rx -t $out/bin/
32 # Swap keyword order to satisfy SWIG parser
34 sed -r -i 's/(\<_Complex)(\s+)(float|double)/\3\2\1/' $out/include/$pname/freedv_api.h
38 # RPATH of binary /nix/store/.../bin/freedv_rx contains a forbidden reference to /build/
39 "-DCMAKE_SKIP_BUILD_RPATH=ON"
40 ] ++ lib.optionals freedvSupport [
45 description = "Speech codec designed for communications quality speech at low data rates";
46 homepage = "https://www.rowetel.com/codec2.html";
47 license = licenses.lgpl21Only;
48 platforms = platforms.unix;
49 maintainers = with maintainers; [ markuskowa ];