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: init at 9.95.0 #30256
Conversation
On Linux I also need: diff --git a/pkgs/development/libraries/easyloggingpp/default.nix b/pkgs/development/libraries/easyloggingpp/default.nix
index 3bfcd7331c8..9fe8a998548 100644
--- a/pkgs/development/libraries/easyloggingpp/default.nix
+++ b/pkgs/development/libraries/easyloggingpp/default.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [cmake];
buildInputs = [gtest];
cmakeFlags = [ "-Dtest=ON" "-Dbuild_static_lib=ON" ];
- NIX_CFLAGS_COMPILE = "-std=c++11";
+ NIX_CFLAGS_COMPILE = "-std=c++11 -pthread";
meta = {
description = "C++ logging library";
homepage = https://muflihun.github.io/easyloggingpp/; |
}; | ||
nativeBuildInputs = [cmake]; | ||
buildInputs = [gtest]; | ||
cmakeFlags = [ "-Dtest=ON" "-Dbuild_static_lib=ON" ]; |
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.
We prefer shared libraries in nixpkgs.
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.
Okay, that would perhaps make the project's supported usage (either add the source to your project or the static library) not work for nixpkgs.
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.
you can have easily extend the existing derivation in a shell.nix
for your project:
(easyloggingpp.overrideAttrs (old: { cmakeFlags = old.cmakeFlags ++ ["-Dbuild_static_lib=ON"];}))
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.
If I’m the only user I can leave it defined as a local package called from my config.nix
, but I don’t see much point in having an unusable configuration in nixpkgs. I suppose the required override is shorter than the package definition, but adding something in a known broken state seems unhelpful.
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.
Why is a shared library unusable or unbroken?
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.
It doesn’t naively build as shared. The purpose of the library is that this used to be a single-header package, but compile times were bad. They moved what they could into a C++ source file so some parts could be compiled once for each project, or once altogether if you link the static library.
I’ll take another whack at resolving the linking problems I saw when trying to switch it to shared.
b8e7b6f
to
f5c129d
Compare
Motivation for this change
Adding a package definition for a small C++ logging framework
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)