1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 19:45:54 +00:00
nixpkgs/pkgs/development/libraries/libiio/default.nix
Austin Seipp af48e5783a libiio: install python bindings
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-09-26 19:37:40 -05:00

39 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub
, cmake, flex, bison
, libxml2, python
}:
stdenv.mkDerivation rec {
name = "libiio-${version}";
version = "0.15";
src = fetchFromGitHub {
owner = "analogdevicesinc";
repo = "libiio";
rev = "refs/tags/v${version}";
sha256 = "05sbvvjka03qi080ad6g2y6gfwqp3n3zv7dpv237dym0zjyxqfa7";
};
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake flex bison ];
buildInputs = [ libxml2 ];
postInstall = ''
mkdir -p $python/lib/${python.libPrefix}/site-packages/
touch $python/lib/${python.libPrefix}/site-packages/
cp ../bindings/python/iio.py $python/lib/${python.libPrefix}/site-packages/
substitute ../bindings/python/iio.py $python/lib/${python.libPrefix}/site-packages/iio.py \
--replace 'libiio.so.0' $lib/lib/libiio.so.0
'';
meta = with stdenv.lib; {
description = "API for interfacing with the Linux Industrial I/O Subsystem";
homepage = https://github.com/analogdevicesinc/libiio;
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = with maintainers; [ thoughtpolice ];
};
}