New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
easyloggingpp: 9.95.0 -> 9.96.0 #30337
Conversation
prefix=$out | ||
includedir=\''${prefix}/include | ||
Cflags: -I\''${includedir} | ||
EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be useful to provide this pkgconfig file also upstream.
Then users don't have to care which package manager they use to compile against easylogging.
When I said, we prefer dynamic libraries over static libraries, I meant we base this decisions on the availability of both. Shared libraries reduced disk space, ram usage and compile time in general and we have a great package manager to take of them. Here it seems we only have either header or a static library - I would make this decision up to you. |
c9d5864
to
1304d3c
Compare
The installation question has come up with this project before. One slightly sticky question is where the I'll have to figure out the easiest way for upstream's build process to generate the |
There should be plenty examples how to generate a |
1304d3c
to
11abc66
Compare
At long last upstream has merged this change! Using the library as a source file now works quite well with |
Added a pkg-config file and copied the relevant source file into the nix store. The idea is that the user may now relatively easily include the library’s source file in their project using common CMake features.
720dfcc
to
ad37fd1
Compare
ad37fd1
to
d12c93b
Compare
I have rebased onto a more recent |
Thanks! |
Added a pkg-config file and copied the relevant source file into the
nix store. The idea is that the user may now relatively easily include
the library’s source file in their project using common CMake features.
Motivation for this change
The easyloggingpp package used to be header-only, but long compile times motivated a change to move as much code as possible into a C++ source file that could be compiled separately. Suggested use of the library involves either:
The former is not preferred in nixpkgs (or several other distros), as @Mic92 rightfully pointed out in #30256
The latter has an additional advantage in that several pre-processor definitions may be used to control the logging library's behavior if one recompiles the source file.
To support including the source file in what I hope is a nixpkgs-friendly way, I create a
pkg-config
file for the project during installation so that including the source file in a project built bycmake
involves something like the following,That example is included in a comment in the nix package definition.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)