1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00
nixpkgs/pkgs/applications/misc/gnuradio-osmosdr/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchgit, cmake, pkgconfig, boost, gnuradio, rtl-sdr, uhd
2015-05-10 16:43:17 +01:00
, makeWrapper, hackrf
, pythonSupport ? true, python, swig
}:
assert pythonSupport -> python != null && swig != null;
stdenv.mkDerivation rec {
name = "gnuradio-osmosdr-${version}";
version = "0.1.4";
src = fetchgit {
url = "git://git.osmocom.org/gr-osmosdr";
rev = "refs/tags/v${version}";
sha256 = "0vyzr4fhkblf2v3d7m0ch5hws4c493jw3ydl4y6b2dfbfzchhsz8";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
cmake boost gnuradio rtl-sdr uhd makeWrapper hackrf
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
postInstall = ''
for prog in "$out"/bin/*; do
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
done
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Gnuradio block for OsmoSDR and rtl-sdr";
homepage = http://sdr.osmocom.org/trac/wiki/GrOsmoSDR;
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ bjornfor the-kenny ];
};
}