mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-14 16:40:09 +03:00
prometheus: split doc and cli into extra outputs
This commit is contained in:
parent
2564ae1eed
commit
da2f281453
@ -31,7 +31,7 @@ let
|
||||
if checkConfigEnabled then
|
||||
pkgs.runCommandLocal
|
||||
"${name}-${replaceStrings [" "] [""] what}-checked"
|
||||
{ buildInputs = [ cfg.package ]; } ''
|
||||
{ buildInputs = [ cfg.package.cli ]; } ''
|
||||
ln -s ${file} $out
|
||||
promtool ${what} $out
|
||||
'' else file;
|
||||
|
@ -41,6 +41,8 @@ buildGoModule rec {
|
||||
pname = "prometheus";
|
||||
inherit version;
|
||||
|
||||
outputs = [ "out" "doc" "cli" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "prometheus";
|
||||
repo = "prometheus";
|
||||
@ -132,6 +134,10 @@ buildGoModule rec {
|
||||
cp -a $src/console_libraries $src/consoles $out/etc/prometheus
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput bin/promtool $cli
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin; # https://hydra.nixos.org/build/130673870/nixlog/1
|
||||
|
||||
passthru.tests = { inherit (nixosTests) prometheus; };
|
||||
|
Loading…
Reference in New Issue
Block a user