uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
60
pkgs/servers/monitoring/loki/default.nix
Normal file
60
pkgs/servers/monitoring/loki/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, nixosTests
|
||||
, systemd
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
version = "2.5.0";
|
||||
pname = "grafana-loki";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "grafana";
|
||||
repo = "loki";
|
||||
sha256 = "sha256-3GeWrkTL3HJQsVBafjSQXHsf1nbVzSVSDZWcJlD22Nw=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
subPackages = [
|
||||
# TODO split every executable into its own package
|
||||
"cmd/loki"
|
||||
"cmd/loki-canary"
|
||||
"clients/cmd/promtail"
|
||||
"cmd/logcli"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = lib.optionals stdenv.isLinux [ systemd.dev ];
|
||||
|
||||
preFixup = lib.optionalString stdenv.isLinux ''
|
||||
wrapProgram $out/bin/promtail \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.getLib systemd}/lib"
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) loki; };
|
||||
|
||||
ldflags = let t = "github.com/grafana/loki/pkg/util/build"; in [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X ${t}.Version=${version}"
|
||||
"-X ${t}.BuildUser=nix@nixpkgs"
|
||||
"-X ${t}.BuildDate=unknown"
|
||||
"-X ${t}.Branch=unknown"
|
||||
"-X ${t}.Revision=unknown"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Like Prometheus, but for logs";
|
||||
license = with licenses; [ agpl3Only asl20 ];
|
||||
homepage = "https://grafana.com/oss/loki/";
|
||||
maintainers = with maintainers; [ willibutz globin mmahut ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue