2020-12-15 10:56:54 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2017-07-19 19:01:40 +02:00
|
|
|
, armadillo
|
|
|
|
, cmake
|
2020-12-15 10:56:54 +01:00
|
|
|
, gmp
|
2017-07-19 19:01:40 +02:00
|
|
|
, glog
|
2021-03-14 19:03:18 +01:00
|
|
|
, gtest
|
2017-07-19 19:01:40 +02:00
|
|
|
, openssl
|
2019-07-25 11:04:55 +02:00
|
|
|
, gflags
|
2021-02-15 21:14:54 +01:00
|
|
|
, gnuradio3_8
|
2020-12-15 10:56:54 +01:00
|
|
|
, libpcap
|
2017-07-19 19:01:40 +02:00
|
|
|
, orc
|
2021-01-03 10:43:56 +01:00
|
|
|
, pkg-config
|
2017-07-19 19:01:40 +02:00
|
|
|
, uhd
|
2019-08-08 22:11:41 +02:00
|
|
|
, log4cpp
|
2020-03-31 16:47:18 +02:00
|
|
|
, blas, lapack
|
2019-08-08 22:11:41 +02:00
|
|
|
, matio
|
|
|
|
, pugixml
|
|
|
|
, protobuf
|
2017-07-19 19:01:40 +02:00
|
|
|
}:
|
|
|
|
|
2021-02-15 21:14:54 +01:00
|
|
|
gnuradio3_8.pkgs.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gnss-sdr";
|
2020-08-10 14:03:26 +02:00
|
|
|
version = "0.0.13";
|
2017-07-19 19:01:40 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gnss-sdr";
|
|
|
|
repo = "gnss-sdr";
|
|
|
|
rev = "v${version}";
|
2020-08-10 14:03:26 +02:00
|
|
|
sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby";
|
2017-07-19 19:01:40 +02:00
|
|
|
};
|
|
|
|
|
2020-12-15 10:56:54 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-02-15 21:14:54 +01:00
|
|
|
gnuradio3_8.unwrapped.python
|
|
|
|
gnuradio3_8.unwrapped.python.pkgs.Mako
|
|
|
|
gnuradio3_8.unwrapped.python.pkgs.six
|
2020-12-15 10:56:54 +01:00
|
|
|
];
|
|
|
|
|
2017-07-19 19:01:40 +02:00
|
|
|
buildInputs = [
|
2020-12-15 10:56:54 +01:00
|
|
|
gmp
|
2017-07-19 19:01:40 +02:00
|
|
|
armadillo
|
2021-02-15 21:14:54 +01:00
|
|
|
gnuradio3_8.unwrapped.boost
|
2017-07-19 19:01:40 +02:00
|
|
|
glog
|
2021-03-14 19:03:18 +01:00
|
|
|
gtest
|
2020-12-15 10:56:54 +01:00
|
|
|
openssl
|
2019-07-25 11:04:55 +02:00
|
|
|
gflags
|
2017-07-19 19:01:40 +02:00
|
|
|
orc
|
|
|
|
# UHD support is optional, but gnuradio is built with it, so there's
|
|
|
|
# nothing to be gained by leaving it out.
|
2021-02-15 21:14:54 +01:00
|
|
|
gnuradio3_8.unwrapped.uhd
|
2019-08-08 22:11:41 +02:00
|
|
|
log4cpp
|
2020-03-31 16:47:18 +02:00
|
|
|
blas lapack
|
2019-08-08 22:11:41 +02:00
|
|
|
matio
|
|
|
|
pugixml
|
|
|
|
protobuf
|
2021-02-15 21:14:54 +01:00
|
|
|
gnuradio3_8.pkgs.osmosdr
|
2020-12-15 10:56:54 +01:00
|
|
|
libpcap
|
2017-07-19 19:01:40 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2019-07-25 11:04:55 +02:00
|
|
|
"-DGFlags_ROOT_DIR=${gflags}/lib"
|
2017-07-19 19:01:40 +02:00
|
|
|
"-DGLOG_INCLUDE_DIR=${glog}/include"
|
2018-11-11 00:53:53 +01:00
|
|
|
"-DENABLE_UNIT_TESTING=OFF"
|
2017-07-19 19:01:40 +02:00
|
|
|
|
|
|
|
# gnss-sdr doesn't truly depend on BLAS or LAPACK, as long as
|
|
|
|
# armadillo is built using both, so skip checking for them.
|
|
|
|
"-DBLAS=YES"
|
|
|
|
"-DLAPACK=YES"
|
2020-03-31 16:47:18 +02:00
|
|
|
"-DBLAS_LIBRARIES=-lblas"
|
|
|
|
"-DLAPACK_LIBRARIES=-llapack"
|
2017-07-19 19:01:40 +02:00
|
|
|
|
|
|
|
# Similarly, it doesn't actually use gfortran despite checking for
|
|
|
|
# its presence.
|
|
|
|
"-DGFORTRAN=YES"
|
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-07-19 19:01:40 +02:00
|
|
|
description = "An open source Global Navigation Satellite Systems software-defined receiver";
|
2020-03-14 06:56:58 +01:00
|
|
|
homepage = "https://gnss-sdr.org/";
|
2017-07-19 19:01:40 +02:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|