2021-03-15 08:37:03 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, armadillo
|
|
|
|
, cmake
|
2021-03-15 08:37:03 +00:00
|
|
|
, gmp
|
2020-04-24 23:36:52 +00:00
|
|
|
, glog
|
|
|
|
, gmock
|
|
|
|
, openssl
|
|
|
|
, gflags
|
2021-03-15 08:37:03 +00:00
|
|
|
, gnuradio3_8
|
|
|
|
, libpcap
|
2020-04-24 23:36:52 +00:00
|
|
|
, orc
|
2021-01-15 22:18:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, uhd
|
|
|
|
, log4cpp
|
|
|
|
, blas, lapack
|
|
|
|
, matio
|
|
|
|
, pugixml
|
|
|
|
, protobuf
|
|
|
|
}:
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
gnuradio3_8.pkgs.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gnss-sdr";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "0.0.13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gnss-sdr";
|
|
|
|
repo = "gnss-sdr";
|
|
|
|
rev = "v${version}";
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
gnuradio3_8.unwrapped.python
|
|
|
|
gnuradio3_8.unwrapped.python.pkgs.Mako
|
|
|
|
gnuradio3_8.unwrapped.python.pkgs.six
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-03-15 08:37:03 +00:00
|
|
|
gmp
|
2020-04-24 23:36:52 +00:00
|
|
|
armadillo
|
2021-03-15 08:37:03 +00:00
|
|
|
gnuradio3_8.unwrapped.boost
|
2020-04-24 23:36:52 +00:00
|
|
|
glog
|
|
|
|
gmock
|
2021-03-15 08:37:03 +00:00
|
|
|
openssl
|
2020-04-24 23:36:52 +00:00
|
|
|
gflags
|
|
|
|
orc
|
|
|
|
# UHD support is optional, but gnuradio is built with it, so there's
|
|
|
|
# nothing to be gained by leaving it out.
|
2021-03-15 08:37:03 +00:00
|
|
|
gnuradio3_8.unwrapped.uhd
|
2020-04-24 23:36:52 +00:00
|
|
|
log4cpp
|
|
|
|
blas lapack
|
|
|
|
matio
|
|
|
|
pugixml
|
|
|
|
protobuf
|
2021-03-15 08:37:03 +00:00
|
|
|
gnuradio3_8.pkgs.osmosdr
|
|
|
|
libpcap
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DGFlags_ROOT_DIR=${gflags}/lib"
|
|
|
|
"-DGLOG_INCLUDE_DIR=${glog}/include"
|
|
|
|
"-DENABLE_UNIT_TESTING=OFF"
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
"-DBLAS_LIBRARIES=-lblas"
|
|
|
|
"-DLAPACK_LIBRARIES=-llapack"
|
|
|
|
|
|
|
|
# Similarly, it doesn't actually use gfortran despite checking for
|
|
|
|
# its presence.
|
|
|
|
"-DGFORTRAN=YES"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An open source Global Navigation Satellite Systems software-defined receiver";
|
|
|
|
homepage = "https://gnss-sdr.org/";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|