Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
40 lines
926 B
Nix
40 lines
926 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
libiio,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libad9361";
|
|
version = "0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "analogdevicesinc";
|
|
repo = "libad9361-iio";
|
|
rev = "v${version}";
|
|
hash = "sha256-9e66qSrKpczatZY9lPAzi/6f7lHChnl2+Pih53oa28Y=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libiio ];
|
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.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;
|
|
};
|
|
}
|