unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: phodina via <help-guix@gnu.org>
To: help-guix <help-guix@gnu.org>
Cc: "cox.katherine.e@gmail.com" <cox.katherine.e@gmail.com>,
	Leo Famulari <leo@famulari.name>,
	"arunisaac@systemreboot.net" <arunisaac@systemreboot.net>,
	Marius Bakke <marius@gnu.org>
Subject: Packaging Grafana
Date: Sun, 15 Jan 2023 09:18:08 +0000	[thread overview]
Message-ID: <U4cud2p-Ms9M4P_VUwxO6HxBv_Us0qunzTs_jLoi1Hnlscr0UlfW4-myPoQR1Q2jLus_sZmgn9TKfAVbWOxkCpFYifBnLN8JUhBXYcB893g=@protonmail.com> (raw)

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	other threads:[~2023-01-15  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15  9:18 phodina via [this message]
2023-01-15 11:12 ` Packaging Grafana Csepp
2023-01-15 17:47   ` Leo Famulari
2023-01-16 11:39   ` libgit2 shallow clone (was Re: Packaging Grafana) Simon Tournier
2023-01-16 16:02     ` Csepp
2023-01-16 16:34       ` Simon Tournier
2023-01-15 17:46 ` Packaging Grafana Leo Famulari
2023-01-21 16:37 ` Katherine Cox-Buday
2023-01-21 16:47   ` Katherine Cox-Buday

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='U4cud2p-Ms9M4P_VUwxO6HxBv_Us0qunzTs_jLoi1Hnlscr0UlfW4-myPoQR1Q2jLus_sZmgn9TKfAVbWOxkCpFYifBnLN8JUhBXYcB893g=@protonmail.com' \
    --to=help-guix@gnu.org \
    --cc=arunisaac@systemreboot.net \
    --cc=cox.katherine.e@gmail.com \
    --cc=leo@famulari.name \
    --cc=marius@gnu.org \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).