File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -403,22 +403,24 @@ executable HaskellEmacs
403
403
(call-process " cabal" nil heB nil " install" )))
404
404
(if (eq tool 'stack )
405
405
(progn (setq haskell-emacs--bin (concat " ~/.local/bin/HaskellEmacs" (when (eq system-type 'windows-nt ) " .exe" )))
406
- (with-temp-buffer
407
- (insert "
406
+ (unless (file-exists-p (concat haskell-emacs-dir " stack.yaml" ))
407
+ (with-temp-buffer
408
+ (insert "
408
409
resolver: lts-6.6
409
410
packages:
410
411
- '.'
411
412
extra-deps: [ atto-lisp-0.2.2.2 ]" )
412
- (write-file (concat haskell-emacs-dir " stack.yaml" )))
413
+ (write-file (concat haskell-emacs-dir " stack.yaml" ) )))
413
414
(message " Compiling ... " )
414
415
(+ (call-process " stack" nil heB nil " setup" )
415
416
(call-process " stack" nil heB nil " install" )))
416
417
(if (eq tool 'nix )
417
418
(progn (setq haskell-emacs--bin (concat haskell-emacs-dir " result/bin/HaskellEmacs" ))
418
- (with-temp-buffer (insert "
419
+ (unless (file-exists-p (concat haskell-emacs-dir " default.nix" ))
420
+ (with-temp-buffer (insert "
419
421
{ nixpkgs ? import <nixpkgs> {} }:
420
422
nixpkgs.pkgs.haskellPackages.callPackage ./HaskellEmacs.nix { }" )
421
- (write-file (concat haskell-emacs-dir " default.nix" )))
423
+ (write-file (concat haskell-emacs-dir " default.nix" ) )))
422
424
(message " Compiling ... " )
423
425
(+ (call-process " nix-shell" nil heB nil " -p" " --pure" " cabal2nix" " --command" " cabal2nix . > HaskellEmacs.nix" )
424
426
(call-process " nix-build" nil heB nil ))))))))
You can’t perform that action at this time.
0 commit comments