2017-07-19 18:01:40 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, armadillo
|
|
|
|
, boost
|
|
|
|
, cmake
|
|
|
|
, glog
|
|
|
|
, gmock
|
|
|
|
, openssl
|
2019-07-25 10:04:55 +01:00
|
|
|
, gflags
|
2017-07-19 18:01:40 +01:00
|
|
|
, gnuradio
|
|
|
|
, orc
|
|
|
|
, pkgconfig
|
|
|
|
, pythonPackages
|
|
|
|
, uhd
|
2019-08-08 21:11:41 +01:00
|
|
|
, log4cpp
|
|
|
|
, openblas
|
|
|
|
, matio
|
|
|
|
, pugixml
|
|
|
|
, protobuf
|
2017-07-19 18:01:40 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gnss-sdr";
|
2019-08-08 21:11:41 +01:00
|
|
|
version = "0.0.11";
|
2017-07-19 18:01:40 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gnss-sdr";
|
|
|
|
repo = "gnss-sdr";
|
|
|
|
rev = "v${version}";
|
2019-08-08 21:11:41 +01:00
|
|
|
sha256 = "0ajj0wx68yyzigppxxa1wag3hzkrjj8dqq8k28rj0jhp8a6bw2q7";
|
2017-07-19 18:01:40 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
armadillo
|
|
|
|
boost.dev
|
|
|
|
cmake
|
|
|
|
glog
|
|
|
|
gmock
|
|
|
|
openssl.dev
|
2019-07-25 10:04:55 +01:00
|
|
|
gflags
|
2017-07-19 18:01:40 +01:00
|
|
|
gnuradio
|
|
|
|
orc
|
|
|
|
pkgconfig
|
|
|
|
pythonPackages.Mako
|
|
|
|
|
|
|
|
# UHD support is optional, but gnuradio is built with it, so there's
|
|
|
|
# nothing to be gained by leaving it out.
|
|
|
|
uhd
|
2019-08-08 21:11:41 +01:00
|
|
|
log4cpp
|
|
|
|
openblas
|
|
|
|
matio
|
|
|
|
pugixml
|
|
|
|
protobuf
|
2017-07-19 18:01:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2019-07-25 10:04:55 +01:00
|
|
|
"-DGFlags_ROOT_DIR=${gflags}/lib"
|
2017-07-19 18:01:40 +01:00
|
|
|
"-DGLOG_INCLUDE_DIR=${glog}/include"
|
2018-11-10 23:53:53 +00:00
|
|
|
"-DENABLE_UNIT_TESTING=OFF"
|
2017-07-19 18:01:40 +01: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"
|
2019-08-08 21:11:41 +01:00
|
|
|
"-DBLAS_LIBRARIES=-lopenblas"
|
|
|
|
"-DLAPACK_LIBRARIES=-lopenblas"
|
2017-07-19 18:01:40 +01:00
|
|
|
|
|
|
|
# Similarly, it doesn't actually use gfortran despite checking for
|
|
|
|
# its presence.
|
|
|
|
"-DGFORTRAN=YES"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An open source Global Navigation Satellite Systems software-defined receiver";
|
2018-06-23 12:34:55 +01:00
|
|
|
homepage = https://gnss-sdr.org/;
|
2017-07-19 18:01:40 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|