all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Feng Shu <tumashu@163.com>
To: guix <guix-devel@gnu.org>
Subject: Re: How can I add a package outside the guix source dir?
Date: Fri, 22 May 2015 19:05:13 +0800	[thread overview]
Message-ID: <87wq00vpna.fsf@163.com> (raw)
In-Reply-To: <87fv6pvvdn.fsf@T420.taylan> ("Taylan Ulrich \"Bayırlı/Kammer\""'s message of "Fri, 22 May 2015 11:01:24 +0200")

taylanbayirli@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> Feng Shu <tumashu@163.com> writes:
>
>> I want to add a package which will used by myself, for example:
>>
>> I don't want to put it to guix source dir, How can I solve the problem?
>
> You can set the environment variable GUIX_PACKAGE_PATH to
> e.g. ~/.guix-packages then put that package definition into
> ~/.guix-packages/emacs.scm and it should work.

I set GUIX_PACKAGE_PATH like below:

#+BEGIN_SRC shell
export GUIX_PACKAGE_PATH="/home/feng/project/eh-guix-package/"
export PYTHONPATH="$HOME/.guix-profile/lib/python3.4/site-packages"
export GUILE_LOAD_PATH="$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/site/2.0/"
export GUILE_LOAD_COMPILED_PATH="$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/site/2.0/"
#+END_SRC

then add file "/home/feng/project/eh-guix-package/"

#+BEGIN_SRC lisp
(define-module (gnu packages emacs-snapshot)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (gnu packages)
  #:use-module (gnu packages emacs))

(define-public emacs-snapshot
  (package (inherit emacs)
           (name "emacs-snapshot")
           (version "20150522.9e41e0b")
           (source (origin
                     (method git-fetch)
                     (uri (git-reference
                           (url "/home/feng/project/emacs")
                           (commit "9e41e0bc6a6fdb7a01841db62d8de42d67be534a")))
                     (sha256
                      (base32
                       "1p50nrmwnx1d6an7daz8fxkj6ylxml7g23b996ba837nlfz3l8ay"))))
           (native-inputs
            `(("autoconf" ,autoconf)
              ("automake" ,automake)
              ,@(package-native-inputs emacs)))
           (arguments
            (substitute-keyword-arguments
                `(;; Build fails if we allow parallel build.
                  #:parallel-build? #f
                                    ;; Tests aren't passing for now.
                                    #:tests? #f
                                    ,@(package-arguments emacs))
              ((#:phases phases)
               `(modify-phases ,phases
                  (add-after 'unpack 'autogen
                             (lambda _
                               (zero? (system* "sh" "autogen.sh"))))))))))

#+END_SRC

but when I run command, it told me that emacs-snapshot module can't be found.

#+BEGIN_COMMENT
guix build -i emacs-snapshot
#+END_COMMENT


>
> See (info "(guix) Package Modules"),
> i.e. https://gnu.org/s/guix/manual/html_node/Package-Modules.html
>
> Taylan

-- 

  reply	other threads:[~2015-05-22 11:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  8:37 How can I add a package outside the guix source dir? Feng Shu
2015-05-22  9:01 ` Taylan Ulrich Bayırlı/Kammer
2015-05-22 11:05   ` Feng Shu [this message]
2015-05-22 11:56     ` 宋文武
2015-05-22 14:22       ` Ludovic Courtès
2015-05-22  9:01 ` Ricardo Wurmus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wq00vpna.fsf@163.com \
    --to=tumashu@163.com \
    --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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.