From: Daniel Pimentel <d4n1@openmailbox.org>
To: guix-devel@gnu.org
Subject: Guix build package and publish
Date: Sun, 31 May 2015 12:25:24 -0300 [thread overview]
Message-ID: <b3c97cc822622c869b65b57df9341e08@openmailbox.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2731 bytes --]
Hi Guix,
I'm trying create package with Guix. Initially I choose a simple package
(ipcalc) but after success I'll create complex package (thanks Andreas
and Ludo for you advice). So, I'd like help for it :)
My steps (I'm used GuixSD) based Ludo and Andreas talk:
1. Clone Guix repository: git clone git://git.savannah.gnu.org/guix.git
2. Create ipcalc.scm file (in attach) based in gnu/packages/indent.scm
and update it:
cd guix; cp gnu/packages/indent.scm gnu/packages/ipcalc.scm; emacs
gnu/packages/ipcalc.scm
3. Add ipcalc to gnu-system.am file:
...
gnu/packages/ipcalc.scm \
...
4. Download package: guix download http://url.package.tar.gz
5. Update hash to ipcalc.scm file: emacs gnu/packages/ipcalc.scm
6. Build package: ./pre-inst-env.in guix build ipcalc -K
But there's errors, running with normal user (last lines):
guix build: error: ipcalc: unknown package
Running with sudo (last lines):
./pre-inst-env.in: line 32: cd: @abs_top_srcdir@: No such file or
directory
./pre-inst-env.in: line 33: cd: @abs_top_builddir@: No such file or
directory
Backtrace:
In ice-9/psyntax.scm:
989: 19 [scan ((define-module (guix ui) #:use-module ...)) () ...]
279: 18 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
411: 17 [eval # ()]
In ice-9/boot-9.scm:
2951: 16 [define-module* (guix ui) #:filename ...]
2926: 15 [resolve-imports (((guix utils)) ((guix store)) ((guix config))
...)]
2864: 14 [resolve-interface (guix utils) #:select ...]
2789: 13 [#<procedure 247b960 at ice-9/boot-9.scm:2777:4 (name
#:optional autoload version #:key ensure)> # ...]
3065: 12 [try-module-autoload (guix utils) #f]
2401: 11 [save-module-excursion #<procedure 25866c0 at
ice-9/boot-9.scm:3066:17 ()>]
3085: 10 [#<procedure 25866c0 at ice-9/boot-9.scm:3066:17 ()>]
In unknown file:
?: 9 [primitive-load-path "guix/utils" ...]
In ice-9/eval.scm:
505: 8 [#<procedure 23c67c0 at ice-9/eval.scm:499:4 (exp)>
(define-module # # ...)]
In ice-9/psyntax.scm:
1106: 7 [expand-top-sequence ((define-module (guix utils) #:use-module
...)) () ...]
989: 6 [scan ((define-module (guix utils) #:use-module ...)) () ...]
279: 5 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
In ice-9/eval.scm:
411: 4 [eval # ()]
In ice-9/boot-9.scm:
2951: 3 [define-module* (guix utils) #:filename ...]
2926: 2 [resolve-imports (((guix config)) ((srfi srfi-1)) ((srfi
srfi-9)) ...)]
2867: 1 [resolve-interface (guix config) #:select ...]
In unknown file:
?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (guix
config)) #f]
ERROR: In procedure scm-error:
ERROR: no code for module (guix config)
Help me, thanks.
--
Daniel Pimentel (d4n1)
GnuPG (0B1A1914)
FSF (13054)
[-- Attachment #2: ipcalc.scm --]
[-- Type: text/plain, Size: 2186 bytes --]
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; 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 (gnu packages ipcalc)
#:use-module (gnu packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
(define-public ipcalc
(package
(name "ipcalc")
(version "0.41")
(source (origin
(method url-fetch)
(uri (string-append "mirror://http://jodies.de/ipcalc-archive/ipcalc-" version
".tar.gz"))
(sha256 (base32
"12if9sm8h2ac0pgwkw835cgyqjxm6h27k4kfn2vfas9krrqwbafx"))))
(build-system gnu-build-system)
(arguments
`(#:phases (alist-cons-after
'unpack 'fix-docdir
(lambda _
;; Although indent uses a modern autoconf in which docdir
;; defaults to PREFIX/share/doc, the doc/Makefile.am
;; overrides this to be in PREFIX/doc. Fix this.
(substitute* "doc/Makefile.in"
(("^docdir = .*$") "docdir = @docdir@\n")))
%standard-phases)))
(synopsis "IP Calculator")
(description
"Ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range..")
(license gpl2)
(home-page "http://jodies.de/ipcalc/")))
next reply other threads:[~2015-05-31 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-31 15:25 Daniel Pimentel [this message]
2015-05-31 15:41 ` Guix build package and publish Ricardo Wurmus
2015-05-31 17:06 ` Mark H Weaver
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=b3c97cc822622c869b65b57df9341e08@openmailbox.org \
--to=d4n1@openmailbox.org \
--cc=guix-devel@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).