unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Csepp <raingloom@riseup.net>
To: phodina via <help-guix@gnu.org>
Subject: Re: Packaging Grafana
Date: Sun, 15 Jan 2023 12:12:40 +0100	[thread overview]
Message-ID: <86v8l8yrqp.fsf@riseup.net> (raw)
In-Reply-To: <U4cud2p-Ms9M4P_VUwxO6HxBv_Us0qunzTs_jLoi1Hnlscr0UlfW4-myPoQR1Q2jLus_sZmgn9TKfAVbWOxkCpFYifBnLN8JUhBXYcB893g=@protonmail.com>


phodina via <help-guix@gnu.org> writes:

> 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:
>
> $ 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)))
>
> 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

Honestly, I think our Go importer needs to be rewritten to just use Go's
libraries instead of trying to replicate all functionality in Guile.  It
does a lot of... let's say sub-optimal things currently, like cloning
full git repos, when Go is smart enough to only clone what it needs for
dependency resolution.


  reply	other threads:[~2023-01-15 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15  9:18 Packaging Grafana phodina via
2023-01-15 11:12 ` Csepp [this message]
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=86v8l8yrqp.fsf@riseup.net \
    --to=raingloom@riseup.net \
    --cc=help-guix@gnu.org \
    /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).