[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode 95ef285e74 277/500: Update .nix script
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode 95ef285e74 277/500: Update .nix script |
Date: |
Sat, 29 Jan 2022 08:27:13 -0500 (EST) |
branch: elpa/nix-mode
commit 95ef285e7455bb88bf81d36057aa6649dc8cd995
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Update .nix script
Makes it easier to do things in travis.
---
.gitignore | 3 +++
.travis.yml | 24 +++++++++++++-----------
Makefile | 42 +++++++++++++++++++++++++++---------------
default.nix | 20 ++++++++++++++++++++
nix-mode.nix | 3 ---
5 files changed, 63 insertions(+), 29 deletions(-)
diff --git a/.gitignore b/.gitignore
index 66a97ac24c..bfc379fa2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,6 @@ result
*.html
*.texi
*.info
+*.tex
+*.pdf
+auto/
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index b8a997a295..712ed64879 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,16 @@
-language: emacs-lisp
-env:
- - EVM_EMACS=emacs-24.5-travis
- - EVM_EMACS=emacs-git-snapshot-travis
+language: nix
-before_install:
- - git clone https://github.com/rejeep/evm.git $HOME/.evm
- - export PATH=$HOME/.evm/bin:$PATH
+script:
+ - nix-build
- - evm config path /tmp
- - evm install $EVM_EMACS --use --skip
+matrix:
+ include:
+ - os: linux
+ dist: trusty
+ - os: linux
+ dist: trusty
+ - os: osx
-script:
- - make test
+cache:
+ directories:
+ - /nix/store
diff --git a/Makefile b/Makefile
index 52991ac33f..4e1d93f6bc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,4 @@
-emacs ?= emacs
-
-.PHONY: test clean
+.PHONY: test clean install run
ELS = nix.el nix-company.el nix-drv-mode.el nix-format.el \
nix-instantiate.el nix-mode.el nix-mode-mmm.el \
@@ -8,18 +6,34 @@ ELS = nix.el nix-company.el nix-drv-mode.el nix-format.el \
nix-shell.el nix-store.el
ELCS = $(ELS:.el=.elc)
-DOCS = nix-mode.info nix-mode.html nix-mode.pdf
+DOCS = nix-mode.info nix-mode.html # nix-mode.pdf
+
+DESTDIR =
+PREFIX = /usr
-all: $(ELCS) $(DOCS) test
+all: $(ELCS) $(DOCS)
test:
- emacs -Q -batch -l nix-mode.el \
+ emacs -batch -L . \
-l tests/nix-mode-tests.el \
-l tests/nix-font-lock-tests.el \
-f ert-run-tests-batch-and-exit
+install: $(ELCS) $(DOCS)
+ mkdir -p $(DESTDIR)$(PREFIX)/share/emacs/site-lisp/nix-mode/
+ cp $(ELCS) $(DESTDIR)$(PREFIX)/share/emacs/site-lisp/nix-mode/
+
+ mkdir -p $(DESTDIR)$(PREFIX)/share/doc/nix-mode/
+ cp $(DOCS) $(DESTDIR)$(PREFIX)/share/doc/nix-mode/
+
+clean:
+ rm -f $(ELCS) $(DOCS)
+
+run:
+ emacs -l nix-mode.el
+
%.elc: %.el
- emacs -Q -batch -L . --eval "(progn\
+ emacs -batch -L . --eval "(progn\
(when (file-exists-p \"$@\")\
(delete-file \"$@\"))\
(fset 'message* (symbol-function 'message))\
@@ -29,10 +43,9 @@ test:
-f batch-byte-compile $<
%.texi: %.org
- emacs --batch -Q \
- -l ox-extra -l org-man -l ox-texinfo.el $< \
+ emacs --batch \
+ -l ox-extra -l org-man -l ox-texinfo $< \
-f org-texinfo-export-to-texinfo
- @echo >> $@
%.info: %.texi
makeinfo --no-split $< -o $@
@@ -40,8 +53,7 @@ test:
%.html: %.texi
makeinfo --html --no-split $<
-%.pdf: %.texi
- texi2pdf --clean $< > /dev/null
-
-clean:
- rm *.elc
+%.pdf: %.org
+ emacs --batch \
+ -l ox-extra -l ox-latex $< \
+ -f org-latex-export-to-pdf
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000000..01cf1347a0
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,20 @@
+{ pkgs ? import <nixpkgs> {}}:
+let
+ inherit (pkgs) emacsWithPackages stdenvNoCC texinfo;
+ emacs = emacsWithPackages (epkgs: with epkgs; [
+ org-plus-contrib
+ company
+ json-mode
+ mmm-mode
+ ]);
+in stdenvNoCC.mkDerivation {
+ name = "nix-mode";
+ src = ./.;
+ nativeBuildInputs = [ emacs texinfo ];
+ makeFlags = [ "PREFIX=$(out)" ];
+ shellHook = ''
+ echo Run make run to get vanilla emacs with nix-mode loaded.
+ '';
+ doCheck = true;
+ checkTarget = "test";
+}
diff --git a/nix-mode.nix b/nix-mode.nix
deleted file mode 100644
index d0f56c6d0c..0000000000
--- a/nix-mode.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-with import <nixpkgs> {};
-
-emacsWithPackages (epkgs: [ epkgs.nix-mode ])
- [nongnu] elpa/nix-mode 3aeec264e0 236/500: nix-search: add nix-search-read-attr, (continued)
- [nongnu] elpa/nix-mode 3aeec264e0 236/500: nix-search: add nix-search-read-attr, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode fea066cec6 241/500: Fix run phase, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 6532fcf244 244/500: Don’t expand nix-file in nix-shell., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 097b7bb992 257/500: Add nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode a6571fa877 260/500: Add nix-log.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 0c2807f037 262/500: Cleanup nix-build.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b62c395b65 264/500: Remove nix-shell-haskell.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1dd112e5cf 267/500: Fix function used as variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode f1973ceb4b 269/500: Add .nix to auto-mode-alist, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1389a6b25a 275/500: Fix flycheck warnings, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 95ef285e74 277/500: Update .nix script,
ELPA Syncer <=
- [nongnu] elpa/nix-mode 1ade7b76bd 282/500: ert/indent: Add testcase for contents of lists, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 02b59d9bcf 283/500: ert/indent: Add testcases for issues reported in #60, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode bb602e160f 286/500: Cleanups, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7526a43ea0 292/500: tests: Rename test for consistency with the rest, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aa47e0c5ae 302/500: Fix indentation of lambdas starting at bol., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode e744c602fd 304/500: Replace regex operations with faster alternatives in the lexer., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8721f63650 310/500: Merge pull request #79 from j-piecuch/smie, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5fcdd667de 312/500: Make smie-indent-line the default indent function, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode b902e15c1f 003/500: Create nix-mode.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1e74e5021a 002/500: Create LICENSE, ELPA Syncer, 2022/01/29