help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Packaging Grafana


From: phodina
Subject: Packaging Grafana
Date: Sun, 15 Jan 2023 09:18:08 +0000

Hi Guix,

Grafana [1] is an awesome tool to visualize and analyze various kind of data.

It's FOSS project under AGPL3+.

The small drawback is it's written in Go and Typescript.

As far as I understand for Go there's the file go.mod​ describing the 
dependencies [2] and for Typescript there's file package.json​.[3]

I've tried to use the guix import​ command, however, it fails to add even the 
Go dependencies.

Also since the dependency chain is obviously huge how should the porting be 
done?

Any experience porting some similar package with dos and don'ts?

The short term solution at least in my case is to use the prebuilt static 
binary which works after running patchelf on it. That's also how Nix package 
looks like. [4]

Here's what the importer returns:

---8<---------------cut here---------------start------------->8---
$ guix import go -r github.com/grafana/grafana
(define-public go-github-com-grafana-grafana
(package
(name "go-github-com-grafana-grafana")
(version "5.4.5+incompatible")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/grafana/grafana";)
(commit (go-version->git-ref version))))
(file-name (git-file-name name version))
(sha256
(base32
"1rgcy21amrh6syf21p2gpdbwzc2mcjw6wsbhwwr7v40rdx12rmcm"))))
(build-system go-build-system)
(arguments
'(#:import-path "github.com/grafana/grafana"))
(home-page "https://github.com/grafana/grafana";)
(synopsis "")
(description
"@@url{https://grafana.com,Website} | @@url{https://twitter.com/grafana,Twitter}
| @@url{https://community.grafana.com,Community & Forum}") (license 
license:asl2.0)))

---8<---------------cut here---------------end------------->8---

1 https://grafana.com/
2 https://github.com/grafana/grafana/blob/main/go.mod
3 https://github.com/grafana/grafana/blob/main/package.json
4 
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/monitoring/grafana.nix

----
Petr

reply via email to

[Prev in Thread] Current Thread [Next in Thread]