From 68c873e2d476f717f64cb15b98318985ca1eca74 Mon Sep 17 00:00:00 2001
From: "Alexander I.Grafov (Axel)" <grafov@gmail.com>
Date: Wed, 11 Mar 2015 00:35:07 +0300
Subject: [PATCH] system: Add fish and zsh to shells list.

* gnu/system.scm (etc-directory): Add "fish" and "zsh" to /etc/shells
  if they was installed.
---
 gnu/system.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 1a0aee4..c098b1e 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -417,10 +417,14 @@ settings for 'guix.el' to work out-of-the-box."
        (sudoers    (text-file "sudoers" sudoers))
        (login.defs (text-file "login.defs" "# Empty for now.\n"))
        (shells     (text-file "shells"            ; used by xterm and others
-                              "\
+                              (string-append "\
 /bin/sh
 /run/current-system/profile/bin/sh
-/run/current-system/profile/bin/bash\n"))
+/run/current-system/profile/bin/bash\n"
+                              (if (not (null? (find-packages-by-name "fish")))
+                                  "/run/current-system/profile/bin/fish\n")
+                              (if (not (null? (find-packages-by-name "zsh")))
+                                  "/run/current-system/profile/bin/zsh\n"))))
        (emacs      (emacs-site-directory))
        (issue      (text-file "issue" issue))
        (nsswitch   (text-file "nsswitch.conf"
-- 
2.2.1

