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
fluent-bit: init at 1.0.6 #60887
fluent-bit: init at 1.0.6 #60887
Conversation
name = "fluentbit"; | ||
version = "1.0.6"; | ||
buildInputs = [ cmake ]; | ||
builder = ./builder.sh; |
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'm not seeing a specific reason you need your own builder so you can remove this and the default will take care of it for you.
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.
The package does not trivially build with the default builder. However, there are two problems with this approach:
-
$out/bin
is filled with programs that do not belong in the package (xxd-c
,hello_world
,onigmo-config
, etc.) while$out/{include,lib}
is missing. -
Builders do not compose and as such should generally be used as a last resort.
In this case, upstream assumed impure FHS location of systemd unit directory, which causes an error during installPhase
. Fixing that in postPatch
phase will suffice:
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace /lib/systemd $out/lib/systemd
'';
homepage = "https://fluentbit.io"; | ||
maintainers = [ maintainers.samrose ]; | ||
license = licenses.asl20; | ||
platforms = platforms.linux; |
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.
The website says this software also supports osx.
meta = with stdenv.lib; { | ||
description = "fluentbit"; | ||
homepage = "https://fluentbit.io"; | ||
maintainers = [ maintainers.samrose ]; |
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'll need to add yourself as an entry to maintainers/maintainer-list.nix, though please do this in a separate commit.
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.
Please review changes between b9f68c5f0fe3088c73cc4587063d7b683c3f2f2d and 71077639c833763edb3e9b255706794fbc7e9b4a.
Also, you will need to add yourself to maintainers list in order for metadata to evaluate correctly (as a separate commit). See instructions in maintainers/maintainer-list.nix
on how to do so.
pkgs/top-level/all-packages.nix
Outdated
@@ -2824,6 +2824,8 @@ in | |||
|
|||
fltrdr = callPackage ../tools/misc/fltrdr { stdenv = gcc8Stdenv; }; | |||
|
|||
fluentbit = callPackage ../tools/misc/fluent-bit { }; |
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.
Package name should be consisent with folder name, derivation name, and preferably, executable name. fluent-bit
seems to be the upstream name of this package.
name = "fluentbit"; | ||
version = "1.0.6"; | ||
buildInputs = [ cmake ]; | ||
builder = ./builder.sh; |
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.
The package does not trivially build with the default builder. However, there are two problems with this approach:
-
$out/bin
is filled with programs that do not belong in the package (xxd-c
,hello_world
,onigmo-config
, etc.) while$out/{include,lib}
is missing. -
Builders do not compose and as such should generally be used as a last resort.
In this case, upstream assumed impure FHS location of systemd unit directory, which causes an error during installPhase
. Fixing that in postPatch
phase will suffice:
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace /lib/systemd $out/lib/systemd
'';
@GrahamcOfBorg build fluent-bit |
It would be nice if the git history was rewritten here into 2 commits, the first of which adding samrose to the maintainer list, and the second being the rest squashed. |
Motivation for this change
adding a package that installs https://fluentbit.io
Things done
created a pkg, and added to all-packages.nix
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)