* Guix build package and publish
@ 2015-05-31 15:25 Daniel Pimentel
2015-05-31 15:41 ` Ricardo Wurmus
2015-05-31 17:06 ` Mark H Weaver
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Pimentel @ 2015-05-31 15:25 UTC (permalink / raw)
To: guix-devel
[-- 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/")))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guix build package and publish
2015-05-31 15:25 Guix build package and publish Daniel Pimentel
@ 2015-05-31 15:41 ` Ricardo Wurmus
2015-05-31 17:06 ` Mark H Weaver
1 sibling, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2015-05-31 15:41 UTC (permalink / raw)
To: Daniel Pimentel; +Cc: guix-devel
> 6. Build package: ./pre-inst-env.in guix build ipcalc -K
This is wrong. "./pre-inst-env.in" is a template that is used to
produce the script "./pre-inst-env" at build time. If you do not have
"./pre-inst-env" you probably have not actually built Guix yet.
~~ Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guix build package and publish
2015-05-31 15:25 Guix build package and publish Daniel Pimentel
2015-05-31 15:41 ` Ricardo Wurmus
@ 2015-05-31 17:06 ` Mark H Weaver
1 sibling, 0 replies; 3+ messages in thread
From: Mark H Weaver @ 2015-05-31 17:06 UTC (permalink / raw)
To: Daniel Pimentel; +Cc: guix-devel
Daniel Pimentel <d4n1@openmailbox.org> writes:
> 6. Build package: ./pre-inst-env.in guix build ipcalc -K
You need to run "./pre-inst-env", not "./pre-inst-env.in". The latter
file is a template used to create "./pre-inst-env", and it should not
have been executable, so I'm not sure how you were able to run it.
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-31 17:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-31 15:25 Guix build package and publish Daniel Pimentel
2015-05-31 15:41 ` Ricardo Wurmus
2015-05-31 17:06 ` Mark H Weaver
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).