nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 90 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 mkDerivation, 5 fetchgit, 6 gnuradio, 7 cmake, 8 pkg-config, 9 logLib, 10 libsndfile, 11 mpir, 12 boost, 13 gmp, 14 thrift, 15 fftwFloat, 16 python, 17 uhd, 18 icu, 19 airspy, 20 hackrf, 21 libbladeRF, 22 rtl-sdr, 23 soapysdr-with-plugins, 24 gnuradioAtLeast, 25}: 26 27mkDerivation rec { 28 pname = "gr-osmosdr"; 29 version = "0.2.6"; 30 31 src = fetchgit { 32 url = "https://gitea.osmocom.org/sdr/gr-osmosdr"; 33 rev = "v${version}"; 34 hash = "sha256-jCUzBY1pYiEtcRQ97t9F6uEMVYw2NU0eoB5Xc2H6pGQ="; 35 }; 36 37 disabled = gnuradioAtLeast "3.11"; 38 39 outputs = [ 40 "out" 41 "dev" 42 ]; 43 44 buildInputs = [ 45 logLib 46 mpir 47 boost 48 fftwFloat 49 gmp 50 icu 51 airspy 52 hackrf 53 libbladeRF 54 rtl-sdr 55 soapysdr-with-plugins 56 ] 57 ++ lib.optionals (gnuradio.hasFeature "gr-blocks") [ 58 libsndfile 59 ] 60 ++ lib.optionals (gnuradio.hasFeature "gr-uhd") [ 61 uhd 62 ] 63 ++ lib.optionals (gnuradio.hasFeature "gr-ctrlport") [ 64 thrift 65 python.pkgs.thrift 66 ] 67 ++ lib.optionals (gnuradio.hasFeature "python-support") [ 68 python.pkgs.numpy 69 python.pkgs.pybind11 70 ]; 71 cmakeFlags = [ 72 (if (gnuradio.hasFeature "python-support") then "-DENABLE_PYTHON=ON" else "-DENABLE_PYTHON=OFF") 73 ]; 74 nativeBuildInputs = [ 75 cmake 76 pkg-config 77 ] 78 ++ lib.optionals (gnuradio.hasFeature "python-support") [ 79 python.pkgs.mako 80 python 81 ]; 82 83 meta = { 84 description = "Gnuradio block for OsmoSDR and rtl-sdr"; 85 homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR"; 86 license = lib.licenses.gpl3Plus; 87 maintainers = with lib.maintainers; [ bjornfor ]; 88 platforms = lib.platforms.unix; 89 }; 90}