unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Building Go package - GNU or  Go build system
@ 2021-05-08 11:29 phodina via
  0 siblings, 0 replies; only message in thread
From: phodina via @ 2021-05-08 11:29 UTC (permalink / raw)
  To: help-guix

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-08 21:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 11:29 Building Go package - GNU or Go build system phodina via

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git