forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
79 lines
1.5 KiB
Nix
79 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub
|
|
, armadillo
|
|
, boost
|
|
, cmake
|
|
, glog
|
|
, gmock
|
|
, openssl
|
|
, gflags
|
|
, gnuradio
|
|
, orc
|
|
, pkg-config
|
|
, pythonPackages
|
|
, uhd
|
|
, log4cpp
|
|
, blas, lapack
|
|
, matio
|
|
, pugixml
|
|
, protobuf
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "gnss-sdr";
|
|
version = "0.0.13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gnss-sdr";
|
|
repo = "gnss-sdr";
|
|
rev = "v${version}";
|
|
sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
buildInputs = [
|
|
armadillo
|
|
boost.dev
|
|
glog
|
|
gmock
|
|
openssl.dev
|
|
gflags
|
|
gnuradio
|
|
orc
|
|
pythonPackages.Mako
|
|
pythonPackages.six
|
|
|
|
# UHD support is optional, but gnuradio is built with it, so there's
|
|
# nothing to be gained by leaving it out.
|
|
uhd
|
|
log4cpp
|
|
blas lapack
|
|
matio
|
|
pugixml
|
|
protobuf
|
|
];
|
|
|
|
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"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "An open source Global Navigation Satellite Systems software-defined receiver";
|
|
homepage = "https://gnss-sdr.org/";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|