1 { lib, stdenv, fetchFromGitHub, cmake, libiio }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "analogdevicesinc";
9 repo = "libad9361-iio";
11 hash = "sha256-9e66qSrKpczatZY9lPAzi/6f7lHChnl2+Pih53oa28Y=";
14 nativeBuildInputs = [ cmake ];
16 buildInputs = [ libiio ];
18 postPatch = lib.optionalString stdenv.isDarwin ''
19 # Fix iio include path on darwin to match linux
21 substituteInPlace $i \
22 --replace 'iio/iio.h' 'iio.h'
27 description = "IIO AD9361 library for filter design and handling, multi-chip sync, etc";
28 homepage = "http://analogdevicesinc.github.io/libad9361-iio/";
29 license = licenses.lgpl21Plus;
30 maintainers = with maintainers; [ sikmir ];
31 platforms = platforms.linux ++ platforms.darwin;