-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #318613 from msanft/grafana-reporter/build-go-module
grafana-reporter: migrate to buildGoModule
- Loading branch information
Showing
4 changed files
with
24 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 22 additions & 14 deletions
36
...s/monitoring/grafana-reporter/default.nix → pkgs/by-name/gr/grafana-reporter/package.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
{ lib, buildGoPackage, fetchFromGitHub, tetex, makeWrapper }: | ||
|
||
with lib; | ||
|
||
buildGoPackage rec { | ||
{ lib | ||
, buildGoModule | ||
, fetchFromGitHub | ||
, tetex | ||
, makeWrapper | ||
}: | ||
buildGoModule rec { | ||
pname = "reporter"; | ||
version = "2.3.1"; | ||
rev = "v${version}"; | ||
|
||
goPackagePath = "github.com/IzakMarais/reporter"; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
src = fetchFromGitHub { | ||
inherit rev; | ||
rev = "v${version}"; | ||
owner = "IzakMarais"; | ||
repo = "reporter"; | ||
sha256 = "sha256-lsraJwx56I2Gn8CePWUlQu1qdMp78P4xwPzLxetYUcw="; | ||
}; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
vendorHash = null; | ||
|
||
postPatch = '' | ||
go mod init github.com/IzakMarais/reporter | ||
''; | ||
|
||
postInstall = '' | ||
wrapProgram $out/bin/grafana-reporter \ | ||
--prefix PATH : ${makeBinPath [ tetex ]} | ||
--prefix PATH : ${lib.makeBinPath [ tetex ]} | ||
''; | ||
|
||
# Testing library used had a breaking API change and upstream didn't adapt. | ||
doCheck = false; | ||
|
||
meta = { | ||
description = "PDF report generator from a Grafana dashboard"; | ||
mainProgram = "grafana-reporter"; | ||
homepage = "https://github.com/IzakMarais/reporter"; | ||
license = licenses.mit; | ||
maintainers = with maintainers; [ disassembler ]; | ||
license = lib.licenses.mit; | ||
maintainers = [ lib.maintainers.disassembler ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters