Hi,
I’m trying to use GitHub - rpp0/gr-lora: GNU Radio blocks for receiving LoRa modulated radio messages using SDR, I’ve managed create an derivation:
gr-lora = with final; let
python = python3.withPackages (p: [p.pybind11 p.numpy]);
in
stdenv.mkDerivation {
name = "gr-lora";
version = self.shortRev or (toString self.lastModified);
nativeBuildInputs = [cmake];
passthru = {
inherit python;
};
cmakeFlags = [
"-DPYTHON_NUMPY_INCLUDE_DIRS=${python}/${python.sitePackages}/numpy/core/include"
];
NIX_CFLAGS_COMPILE = "-I ${python}/${python.sitePackages}/numpy/core/include";
buildInputs = [gnuradio spdlog gmp boost volk python liquid-dsp log4cpp numcpp];
src = self;
};
Building the derivation results in the following directory structue:
tree result
result
├── include
│ └── lora
│ ├── api.h
│ ├── channelizer.h
│ ├── controller.h
│ ├── debugger.h
│ ├── decoder.h
│ ├── loraphy.h
│ ├── loratap.h
│ ├── message_file_sink.h
│ ├── message_socket_sink.h
│ ├── message_socket_source.h
│ └── utilities.h
├── lib
│ ├── cmake
│ │ └── lora
│ │ ├── gnuradio-loraConfig.cmake
│ │ ├── gnuradio-loraTargets.cmake
│ │ ├── gnuradio-loraTargets-release.cmake
│ │ └── loraConfig.cmake
│ ├── libgnuradio-lora.so -> libgnuradio-lora.so.1.0.0
│ ├── libgnuradio-lora.so.1.0.0 -> libgnuradio-lora.so.1.0.0.0
│ ├── libgnuradio-lora.so.1.0.0.0
│ └── python3.11
│ └── site-packages
│ └── lora
│ ├── __init__.py
│ ├── loraconfig.py
│ ├── lora_python.cpython-311-x86_64-linux-gnu.so
│ ├── lora_receiver.py
│ └── lorasocket.py
└── share
└── gnuradio
└── grc
└── blocks
├── lora_controller.block.yml
├── lora_message_file_sink.block.yml
├── lora_message_socket_sink.block.yml
├── lora_message_socket_source.block.yml
└── lora_receiver.block.yml
13 directories, 28 files
The path lib/pthon3.11/site-packages
looks like I would expect an python package to look like. However the python env python3.withPackages(p: [p.gr-lora])
will not make the module available.
Is there anything special I have to add to the derivation for withPackages
to reconise it as a python package or is there sometong else missing?