nixpkgs/pkgs/development
Alexandros Liarokapis e36b4564d2 nanopb: 0.4.6 -> 0.4.8
This commit:
- Bumps the nanopb version
- Adds all runtime configuration options
- Implements proper cross-compilation support which is the main use-case of the library.
- Uses newer `finalAttrs` form of `mkDerivation` to allow for easier attribute overrides.

The cross-compilation support is achieved by splitting the package into two sub-packages
consisting of the build-time generator and the runtime library.

Nanopb explicitely supports this by providing specialized `GENERATOR` and
`RUNTIME` CMake configuration options.

The top-level package uses `propagatedNativeBuildInputs` and `propagatedBuildInputs` to propagate
the sub-packages and also adds convenient symlinks to make certain use cases easier.

== GENERATOR ==

The generator is a mostly ready-to-be-packaged python module tree.
We patch the library to also include the missing `__init__.py` and we
also fix the `PYTHON_INSTDIR` variable to follow best practice and to
prevent the library from attempting to install to a global directory.

We package the python module using `buildPythonPackage` and internally
override python in order to wrap the `nanopb_generator.py` executable.

We do *not* wrap `nanob_generator.py` due to it also being imported directly from python when
used through `protoc-gen-nanopb`.

== RUNTIME ==

The runtime is a simple library that consists of the common
functionality among generated headers/sources.

It is configured through `preprocessor definitions` and consumer projects *must*
be compiled with the same definitions.

This is currently achieved by exposing all configuration options through the top-level overrides and
patching the CMakeLists.txt so that the definitions are added to the to-be-installed
CMake targets as PUBLIC properties.
2024-06-26 22:15:27 +03:00
..
ada-modules
androidndk-pkgs
beam-modules
bower-modules/generic
chez-modules
compilers go_1_23: init at 1.23rc1 2024-06-26 17:35:45 +10:00
coq-modules coqPackages.coq-elpi: avoid top-level with ...; 2024-06-25 09:05:11 -07:00
cuda-modules
dhall-modules
em-modules/generic
embedded
gnuradio-modules
guile-modules
hare-third-party
haskell-modules
idris-modules
interpreters Merge pull request #320009 from r-ryantm/auto-update/chibi 2024-06-26 00:51:09 +02:00
java-modules
julia-modules
libraries nanopb: 0.4.6 -> 0.4.8 2024-06-26 22:15:27 +03:00
lisp-modules
lua-modules
misc
mobile
node-packages Merge pull request #322564 from pyrox0/dotenv-cli-init 2024-06-26 15:04:29 +02:00
ocaml-modules Merge pull request #322205 from vbgl/ocaml-eqaf-0.10 2024-06-25 16:04:49 +02:00
octave-modules
perl-modules
php-packages
python2-modules
python-modules Merge pull request #322159 from r-ryantm/auto-update/python311Packages.plugwise 2024-06-26 20:38:34 +02:00
r-modules
rocm-modules Merge pull request #318374 from rhendric/rhendric/rocmPackages.clr-vendors-patch 2024-06-24 10:19:03 -04:00
ruby-modules
scheme-modules/scheme-bytestructures
skaware-packages
tools Merge pull request #319887 from r-ryantm/auto-update/devpod 2024-06-26 01:30:43 -04:00
web Merge pull request #290110 from r-ryantm/auto-update/minify 2024-06-26 10:53:49 +02:00