1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 cctools,
7 autoSignDarwinBinariesHook,
8 fixDarwinDylibNames,
9}:
10
11stdenv.mkDerivation rec {
12 pname = "liquid-dsp";
13 version = "1.6.0";
14
15 src = fetchFromGitHub {
16 owner = "jgaeddert";
17 repo = "liquid-dsp";
18 rev = "v${version}";
19 sha256 = "sha256-3UKAwhYaYZ42+d+wiW/AB6x5TSOel8d++d3HeZqAg/8=";
20 };
21
22 configureFlags =
23 lib.optionals stdenv.hostPlatform.isDarwin [
24 "LIBTOOL=${cctools}/bin/libtool"
25 ]
26 ++ [
27 # Prevent native cpu arch from leaking into binaries. This might lead to
28 # poor performance, but having portable and working executables is more
29 # important.
30 (lib.enableFeature true "simdoverride")
31 ];
32
33 nativeBuildInputs = [
34 autoreconfHook
35 ]
36 ++ lib.optionals stdenv.hostPlatform.isDarwin [
37 cctools
38 autoSignDarwinBinariesHook
39 fixDarwinDylibNames
40 ];
41
42 meta = {
43 homepage = "https://liquidsdr.org/";
44 description = "Digital signal processing library for software-defined radios";
45 license = lib.licenses.mit;
46 platforms = lib.platforms.unix;
47 };
48}