From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: [PATCH] gnu: Add direnv Date: Sat, 10 Sep 2016 17:39:33 +0100 Message-ID: <20160910163933.24468-2-mail@cbaines.net> References: <20160910163933.24468-1-mail@cbaines.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bilJk-00045o-KG for guix-devel@gnu.org; Sat, 10 Sep 2016 12:39:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bilJf-0000Rz-L9 for guix-devel@gnu.org; Sat, 10 Sep 2016 12:39:47 -0400 Received: from li622-129.members.linode.com ([212.71.249.129]:48701 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bilJf-0000RJ-Eu for guix-devel@gnu.org; Sat, 10 Sep 2016 12:39:43 -0400 In-Reply-To: <20160910163933.24468-1-mail@cbaines.net> 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" To: guix-devel@gnu.org * gnu/packages/shellutils.scm (direnv): New variable. --- gnu/packages/shellutils.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 27f45ba..e582186 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -19,6 +19,7 @@ (define-module (gnu packages shellutils) #:use-module (gnu packages base) + #:use-module (gnu packages golang) #:use-module (gnu packages python) #:use-module (guix licenses) #:use-module (guix packages) @@ -88,3 +89,35 @@ FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop environments. It can move files to the trash, and remove or list files that are already there.") (license gpl2+))) + +(define-public direnv + (package + (name "direnv") + (version "2.9.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/direnv/" name + "/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "04v3v2sz9m6ivgbxcplxscj1dsvpaqpqnxgls4060naj3iz9sg82")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))) + #:phases (modify-phases %standard-phases (delete 'configure)))) + (native-inputs + `(("go" ,go) + ("which" ,which))) + (home-page "http://direnv.net/") + (synopsis "Environment switcher for the shell") + (description "direnv can hook into bash, zsh, tcsh and fish shell to load +or unload environment variables depending on the current directory. This +allows project-specific environment variables without using the ~/.profile +file. + +Before each prompt, direnv checks for the existence of a .envrc file in the +current and parent directories. This file is then used to alter the +environmental variables of the current shell.") + (license expat))) -- 2.9.3