File tree 8 files changed +23
-24
lines changed
8 files changed +23
-24
lines changed Original file line number Diff line number Diff line change 18
18
with :
19
19
nix_path : nixpkgs=channel:${{ matrix.nixpkgs_channel }}
20
20
# - run: nix build
21
- - run : nix-build -E '(import ./.).defaultPackage .${builtins.currentSystem}'
21
+ - run : nix-build -E '(import ./.).packages .${builtins.currentSystem}'
22
22
# - run: nix flake check
23
23
- run : nix-build -E '(import ./.).checks.${builtins.currentSystem}'
Original file line number Diff line number Diff line change 1
1
.PHONY : test clean install run
2
2
3
- ELS = nix.el nix-company.el nix-drv-mode.el nix-format.el \
3
+ ELS = nix.el nix-company.el nix-drv-mode.el nix-flake.el nix- format.el \
4
4
nix-instantiate.el nix-mode.el nix-mode-mmm.el \
5
5
nix-prettify-mode.el nix-repl.el nix-search.el nix-shebang.el \
6
6
nix-shell.el nix-store.el
7
7
ELCS = $(ELS:.el=.elc )
8
8
9
+ DOCS = nix-mode.pdf nix-mode.html nix-mode.info
10
+
9
11
TESTS = tests/nix-mode-tests.el tests/nix-font-lock-tests.el
10
12
11
13
DESTDIR =
Original file line number Diff line number Diff line change 8
8
forAllSystems = f : nixpkgs . lib . genAttrs systems ( system : f system ) ;
9
9
in {
10
10
packages = forAllSystems ( system : with ( import nixpkgs { inherit system ; } ) ; {
11
- nix-mode = let
11
+ default = let
12
12
emacs = emacsWithPackages ( epkgs : with epkgs ; [
13
- org-plus- contrib
13
+ org-contrib
14
14
company
15
15
mmm-mode
16
- f
17
16
magit-section
18
17
transient
19
18
] ) ;
20
- in stdenvNoCC . mkDerivation {
19
+ in stdenv . mkDerivation {
21
20
pname = "nix-mode" ;
22
21
version = "1.5.0" ;
23
22
src = self ;
31
30
} ;
32
31
} ) ;
33
32
34
- defaultPackage = forAllSystems ( system : self . packages . ${ system } . nix-mode ) ;
35
-
36
33
# checks are run in ‘make check’ right now we should probably move
37
34
# these to its own derivation
38
35
checks = forAllSystems ( system : {
39
- inherit ( self . packages . ${ system } ) nix-mode ;
36
+ inherit ( self . packages . ${ system } ) default ;
40
37
} ) ;
41
38
} ;
42
39
}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ ATTR the attribute to find in nix expressions."
27
27
(call-process nix-executable nil (list stdout nil ) nil
28
28
" edit" " -f" file attr)
29
29
(with-current-buffer stdout
30
- (when (eq (buffer-size ) 0 )
30
+ (when (zerop (buffer-size ))
31
31
(error
32
32
" Error: nix edit failed to produce any output" ))
33
33
(setq result (substring (buffer-string ) 0 (- (buffer-size ) 1 ))))
Original file line number Diff line number Diff line change 13
13
:group 'nix
14
14
:type 'string )
15
15
16
- (if (fboundp 'replace-buffer-contents )
17
- (defun nix--replace-buffer-contents (src dst )
18
- (with-current-buffer dst (replace-buffer-contents src)))
19
- (defun nix--replace-buffer-contents (src dst )
20
- (if (not (string= (with-current-buffer src (buffer-string ))
21
- (with-current-buffer dst (buffer-string ))))
22
- (with-current-buffer src
23
- (copy-to-buffer dst (point-min ) (point-max ))))))
16
+ (defun nix--replace-buffer-contents (src dst )
17
+ (if (fboundp 'replace-buffer-contents )
18
+ (with-current-buffer dst (replace-buffer-contents src))
19
+ (unless (string= (with-current-buffer src (buffer-string ))
20
+ (with-current-buffer dst (buffer-string )))
21
+ (with-current-buffer src
22
+ (copy-to-buffer dst (point-min ) (point-max ))))))
24
23
25
24
(defun nix--format-call (buf nixfmt-bin )
26
25
" Format BUF using nixfmt."
Original file line number Diff line number Diff line change 20
20
(nix--process-json-nocheck " search" " --json"
21
21
(unless use-flakes " --file" ) file
22
22
(when no-cache " --no-cache" )
23
- (unless (string= " " search) search)))
23
+ (unless (string-empty-p search) search)))
24
24
25
25
(defface nix-search-pname
26
26
'((t :height 1.5
Original file line number Diff line number Diff line change 22
22
:group 'nix )
23
23
24
24
(defcustom nix-store-path-omit-self t
25
- " Do not list the current entry itself within sections of nix-store-path-mode."
26
- :package-version '(nix-mode . " 1.6.0" ))
25
+ " Do not list the current entry itself within sections of `nix-store-path-mode' ."
26
+ :package-version '(nix-mode . " 1.6.0" )
27
+ :type 'boolean )
27
28
28
29
(defun nix-store-realise (path )
29
30
" Realise a path asynchronously.
You can’t perform that action at this time.
0 commit comments