nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 pname = "codec2";
5 version = "1.0.3";
6
7 src = fetchFromGitHub {
8 owner = "drowe67";
9 repo = "codec2";
10 rev = "v${version}";
11 hash = "sha256-2/Ef5cEe7Kr3a/D8u4BgvTQM6M6vglXsF+ccstFHDUw=";
12 };
13
14 nativeBuildInputs = [ cmake ];
15
16 # Swap keyword order to satisfy SWIG parser
17 postFixup = ''
18 sed -r -i 's/(\<_Complex)(\s+)(float|double)/\3\2\1/' $out/include/$pname/freedv_api.h
19 '';
20
21 meta = with lib; {
22 description = "Speech codec designed for communications quality speech at low data rates";
23 homepage = "https://www.rowetel.com/codec2.html";
24 license = licenses.lgpl21Only;
25 platforms = platforms.unix;
26 maintainers = with maintainers; [ markuskowa ];
27 };
28}