From 22292c0462f20c7986d8ac60bbbd33af7a9f9ba3 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Wed, 19 Jul 2017 10:01:40 -0700 Subject: [PATCH] gnss-sdr: init at 0.0.9 I've tested the resulting build against the sample "2013_04_04_GNSS_SIGNAL_at_CTTC_SPAIN" dataset linked from: http://gnss-sdr.org/my-first-fix/ Many thanks to @knedlsepp for suggestions in #27505 that have substantially improved this package! --- pkgs/applications/misc/gnss-sdr/default.nix | 67 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/applications/misc/gnss-sdr/default.nix diff --git a/pkgs/applications/misc/gnss-sdr/default.nix b/pkgs/applications/misc/gnss-sdr/default.nix new file mode 100644 index 000000000000..68b494927915 --- /dev/null +++ b/pkgs/applications/misc/gnss-sdr/default.nix @@ -0,0 +1,67 @@ +{ stdenv, fetchFromGitHub +, armadillo +, boost +, cmake +, glog +, gmock +, openssl +, google-gflags +, gnuradio +, orc +, pkgconfig +, pythonPackages +, uhd +}: + +stdenv.mkDerivation rec { + name = "gnss-sdr-${version}"; + version = "0.0.9"; + + src = fetchFromGitHub { + owner = "gnss-sdr"; + repo = "gnss-sdr"; + rev = "v${version}"; + sha256 = "0gis932ly3vk7d5qvznffp54pkmbw3m6v60mxjfdj5dd3r7vf975"; + }; + + buildInputs = [ + armadillo + boost.dev + cmake + glog + gmock + openssl.dev + google-gflags + 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 + ]; + + enableParallelBuilding = true; + + cmakeFlags = [ + "-DGFlags_ROOT_DIR=${google-gflags}/lib" + "-DGLOG_INCLUDE_DIR=${glog}/include" + + # 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" + + # 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"; + homepage = http://gnss-sdr.org/; + license = licenses.gpl3Plus; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dfbcf5d1f596..f6d6e4fff7e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14130,6 +14130,8 @@ with pkgs; gksu = callPackage ../applications/misc/gksu { }; + gnss-sdr = callPackage ../applications/misc/gnss-sdr { }; + gnuradio = callPackage ../applications/misc/gnuradio { inherit (python2Packages) cheetah lxml matplotlib numpy python pyopengl pyqt4 scipy wxPython pygtk; fftw = fftwFloat;