From mboxrd@z Thu Jan 1 00:00:00 1970 From: Feng Shu Subject: Re: How can I add a package outside the guix source dir? Date: Fri, 22 May 2015 19:05:13 +0800 Message-ID: <87wq00vpna.fsf@163.com> References: <87oaldvwh6.fsf@163.com> <87fv6pvvdn.fsf@T420.taylan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvkxx-0004XY-He for guix-devel@gnu.org; Fri, 22 May 2015 07:18:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yvkxu-0002H1-Qn for guix-devel@gnu.org; Fri, 22 May 2015 07:18:13 -0400 Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]:36232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yvkxu-0002Gv-IS for guix-devel@gnu.org; Fri, 22 May 2015 07:18:10 -0400 Received: by pdfh10 with SMTP id h10so17327846pdf.3 for ; Fri, 22 May 2015 04:18:09 -0700 (PDT) Received: from tumashu ([120.4.235.49]) by mx.google.com with ESMTPSA id vl9sm1847829pbc.73.2015.05.22.04.18.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 04:18:07 -0700 (PDT) Received: from feng by tumashu with local (Exim 4.84) (envelope-from ) id 1YvklN-0001TG-1s for guix-devel@gnu.org; Fri, 22 May 2015 19:05:13 +0800 In-Reply-To: <87fv6pvvdn.fsf@T420.taylan> ("Taylan Ulrich =?utf-8?Q?=5C=22Bay=C4=B1rl=C4=B1=2FKammer=5C=22=22's?= message of "Fri, 22 May 2015 11:01:24 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") writes: > Feng Shu 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=3D"/home/feng/project/eh-guix-package/" export PYTHONPATH=3D"$HOME/.guix-profile/lib/python3.4/site-packages" export GUILE_LOAD_PATH=3D"$GUILE_LOAD_PATH:$HOME/.guix-profile/share/guile/= site/2.0/" export GUILE_LOAD_COMPILED_PATH=3D"$GUILE_LOAD_PATH:$HOME/.guix-profile/sha= re/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 "9e41e0bc6a6fdb7a01841db62d8de42d67be534= a"))) (sha256 (base32 "1p50nrmwnx1d6an7daz8fxkj6ylxml7g23b996ba837nlfz3l8a= y")))) (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 foun= d. #+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 --=20