aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/package-management.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/package-management.scm')
-rw-r--r--gnu/packages/package-management.scm30
1 files changed, 25 insertions, 5 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 9b31f905e4..a6c97e618e 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
+;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -26,6 +27,7 @@
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
+ #:use-module (guix build-system emacs)
#:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+ asl2.0 bsd-3))
#:use-module (gnu packages)
#:use-module (gnu packages guile)
@@ -310,10 +312,11 @@ generated file."
#t)))
(define-public current-guix
- (let ((select? (delay (or (git-predicate
- (string-append (current-source-directory)
- "/../.."))
- source-file?))))
+ (let* ((repository-root (canonicalize-path
+ (string-append (current-source-directory)
+ "/../..")))
+ (select? (delay (or (git-predicate repository-root)
+ source-file?))))
(lambda ()
"Return a package representing Guix built from the current source tree.
This works by adding the current source tree to the store (after filtering it
@@ -321,7 +324,7 @@ out) and returning a package that uses that as its 'source'."
(package
(inherit guix)
(version (string-append (package-version guix) "+"))
- (source (local-file "../.." "guix-current"
+ (source (local-file repository-root "guix-current"
#:recursive? #t
#:select? (force select?)))))))
@@ -379,6 +382,23 @@ store, usually the directory /nix/store, where each package has its own unique
sub-directory.")
(license lgpl2.1+)))
+(define-public emacs-nix-mode
+ (package
+ (inherit nix)
+ (name "emacs-nix-mode")
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir-elisp
+ ;; Elisp directory is not in root of the source.
+ (lambda _
+ (chdir "misc/emacs"))))))
+ (synopsis "Emacs major mode for editing Nix expressions")
+ (description "@code{nixos-mode} provides an Emacs major mode for editing
+Nix expressions. It supports syntax highlighting, indenting and refilling of
+comments.")))
+
(define-public stow
(package
(name "stow")