unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: phodina via <help-guix@gnu.org>
To: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Building Go package - GNU or  Go build system
Date: Sat, 08 May 2021 11:29:27 +0000	[thread overview]
Message-ID: <dZJ9k2p_RANj7oQ7LT5slzRTm72Qlz62AmMyl5L38nWhf2XRDeiFfs3cohVNyoNcYBH7xSOF5NgXBvIWNcdgfDEq7O3obCoS001qgB9V-fQ=@protonmail.com> (raw)

I'm trying to package sbctl - secureboot manager written in Golang. However, the repository contains a Makefile to simplify the process which works great without packaging.

Firstly, I'd like to ask about the opinion on building the programs that use Makefiles just to invoke the language builder e.g. go, rust... Is it better to skip Makefile and run the go or cargo build-system instead or just follow the instructions and invoke the Makefile itself and deal with the underlying build tools?

Secondly, as I attempt to package it I run into the trouble that go wants to create a cache outside of the out directory.
Could you please help me with the definition of GOCACHE?

;;; GNU Guix --- Functional package management for GNU

;;; Copyright © 2021 Petr Hodina <
phodina@protonmail.com
>

;;;

;;; This file is part of GNU Guix.

;;;

;;; GNU Guix is free software; you can redistribute it and/or modify it

;;; under the terms of the GNU General Public License as published by

;;; the Free Software Foundation; either version 3 of the License, or (at

;;; your option) any later version.

;;;

;;; GNU Guix is distributed in the hope that it will be useful, but

;;; WITHOUT ANY WARRANTY; without even the implied warranty of

;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

;;; GNU General Public License for more details.

;;;

;;; You should have received a copy of the GNU General Public License

;;; along with GNU Guix.  If not, see <
http://www.gnu.org/licenses/
>.

(

define-module

(

expanse

packages

sbctl

)

#

:use-module

(

guix

packages

)

#

:use-module

(

gnu

packages

documentation

)

#

:use-module

(

gnu

packages

golang

)

#

:use-module

(

guix

git-download

)

#

:use-module

(

guix

build-system

gnu

)

#

:use-module

(

guix

licenses

))

(

define-public

sbctl

(

package

(

name

"sbctl"

)

(

version

"master"

)

(

source

(

origin

(

method

git-fetch

)

(

uri

(

git-reference

(

url

"
https://github.com/Foxboron/sbctl
"

)

(

commit

version

)))

(

sha256

(

base32

"1ilrq3ldclr2b8ch8w59y9pdncnjwqbgglvbcf6qzbgqzkn9ad7q"

))))

(

build-system

gnu-build-system

)

(

native-inputs

`

((

"asciidoc"

,

asciidoc

)

(

"go"

,

go

)))

(

inputs

`

((

"go"

,

go

)))

(

arguments

'

(

#

:phases

(

modify-phases

%standard-phases

(

delete

'configure

)

(

replace

'install

(

lambda*

(

#

:key

outputs

#

:allow-other-keys

)

(

let

((

bin

(

string-append

(

assoc-ref

outputs

"out"

)

"/bin"

)))

(

install-file

"sbctl"

bin

)

#t

))))))

(

synopsis

"Secure Boot Manager"

)

(

description

""

)

(

home-page

"
https://github.com/Foxboron/sbctl
"

)

(

license

#f

)))

Sent with [ProtonMail](https://protonmail.com/) Secure Email.

                 reply	other threads:[~2021-05-08 21:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='dZJ9k2p_RANj7oQ7LT5slzRTm72Qlz62AmMyl5L38nWhf2XRDeiFfs3cohVNyoNcYBH7xSOF5NgXBvIWNcdgfDEq7O3obCoS001qgB9V-fQ=@protonmail.com' \
    --to=help-guix@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).