I’ve been trying to write a nix package definition for this GNU Radio library I wrote a while ago, but I’ve been getting this error
/build/source/python/bindings/python_bindings.cc:13:10: fatal error: numpy/arrayobject.h: No such file or directory
saying it can’t find a header file from numpy, even though I’ve included pythonPackages.numpy in propagatedBuildInputs.
Heres the code:
{ lib
, stdenv
, fetchFromGitLab
, cmake
, pkg-config
, cppunit
, boost175
, log4cpp
, python
, doxygen
, gnuradio
, mpir
, volk
, gmp
, liquid-dsp
, icu
, pythonPackages
}:
stdenv.mkDerivation {
pname = "gr-librelora";
version = "1.3";
src = fetchFromGitLab {
owner = "jpsimas";
repo = "librelora";
rev = "v1.3";
sha256 = "1g0sgasjngzwd9pgbb3bnswy6c0k29j0rld0k862w2zjsg52rwra";
};
disabledForGRafter = "3.9";
nativeBuildInputs = [
cmake
pkg-config
doxygen
pythonPackages.pybind11
];
buildInputs = [
cppunit
log4cpp
boost175
gnuradio
mpir
volk
gmp
liquid-dsp
icu
];
propagatedBuildInputs = [
pythonPackages.numpy
];
meta = with lib; {
description = "GNURadio Based LoRa PHY receiver and transmitter implementations";
homepage = "https://gitlab.com/jpsimas/librelora";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [];
};
}
Have I included numpy in the wrong way or is the problem somewhere else? I’ve successfully built this using guix before, so there’s no problem with the library itself.
Thanks for your help