depot/third_party/nixpkgs/pkgs/development/libraries/libad9361/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

33 lines
902 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, libiio }:
stdenv.mkDerivation rec {
pname = "libad9361";
version = "0.2";
src = fetchFromGitHub {
owner = "analogdevicesinc";
repo = "libad9361-iio";
rev = "v${version}";
hash = "sha256-dYoFWRnREvlOC514ZpmmvoS37DmIkVqfq7JPpTXqXd8=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libiio ];
postPatch = lib.optionalString stdenv.isDarwin ''
# Fix iio include path on darwin to match linux
for i in test/*.c; do
substituteInPlace $i \
--replace 'iio/iio.h' 'iio.h'
done
'';
meta = with lib; {
description = "IIO AD9361 library for filter design and handling, multi-chip sync, etc";
homepage = "http://analogdevicesinc.github.io/libad9361-iio/";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.linux ++ platforms.darwin;
};
}