emacs.nix 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. Building and linking the result in the current directory:
  3. $ nix-build emacs.nix
  4. $ ./result/bin/emacs
  5. */
  6. { pkgs ? import <nixpkgs> {} }:
  7. let
  8. xelb = epkgs: epkgs.callPackage ({ cl-generic, elpaBuild, emacs, fetchurl, lib }:
  9. elpaBuild {
  10. pname = "xelb";
  11. ename = "xelb";
  12. version = "0.16";
  13. src = fetchurl {
  14. url = "https://elpa.gnu.org/packages/xelb-0.16.tar";
  15. sha256 = "03wsr1jr7f7zfd80h864rd4makwh4widdnj1kjv2xyjwdgap9rl8";
  16. };
  17. packageRequires = [ cl-generic emacs ];
  18. meta = {
  19. homepage = "https://elpa.gnu.org/packages/xelb.html";
  20. license = lib.licenses.free;
  21. };
  22. }) {};
  23. exwm = epkgs: epkgs.callPackage ({ elpaBuild, fetchurl, lib }:
  24. elpaBuild {
  25. pname = "exwm";
  26. ename = "exwm";
  27. version = "0.21";
  28. src = fetchurl {
  29. url = "https://elpa.gnu.org/packages/exwm-0.21.tar";
  30. sha256 = "07ng1pgsnc3isfsyzh2gfc7391p9il8lb5xqf1z6yqn20w7k6xzj";
  31. };
  32. packageRequires = [ (xelb epkgs) ];
  33. meta = {
  34. homepage = "https://elpa.gnu.org/packages/exwm.html";
  35. license = lib.licenses.free;
  36. };
  37. }) {};
  38. shrink-path = epkgs: epkgs.callPackage ({ dash
  39. , emacs
  40. , f
  41. , fetchFromGitLab
  42. , fetchurl
  43. , lib
  44. , melpaBuild
  45. , s }:
  46. melpaBuild {
  47. pname = "shrink-path";
  48. ename = "shrink-path";
  49. version = "20170812.1947";
  50. src = fetchurl {
  51. url = "https://gitlab.com/bennya/shrink-path.el/-/archive/master/shrink-path.el-master.tar.gz";
  52. sha256 = "089jd59b4y0bairnzfxla9jkxxmg86i8j851g7vjb0cp3msdhjg1";
  53. };
  54. recipe = fetchurl {
  55. url = "https://raw.githubusercontent.com/milkypostman/melpa/86b0d105e8a57d5f0bcde779441dc80b85e170ea/recipes/shrink-path";
  56. sha256 = "0fq13c6g7qbq6f2ry9dzdyg1f6p41wimkjcdaj177rnilz77alzb";
  57. name = "recipe";
  58. };
  59. packageRequires = [ dash emacs f s ];
  60. meta = {
  61. homepage = "https://melpa.org/#/shrink-path";
  62. license = lib.licenses.free;
  63. };
  64. }) {};
  65. doom-modeline = epkgs: epkgs.callPackage ({ all-the-icons
  66. , dash
  67. , eldoc-eval
  68. , emacs
  69. , fetchFromGitHub
  70. , fetchurl
  71. , lib
  72. , melpaBuild
  73. , projectile }:
  74. melpaBuild {
  75. pname = "doom-modeline";
  76. ename = "doom-modeline";
  77. version = "20181204.0530";
  78. src = fetchFromGitHub {
  79. owner = "seagle0128";
  80. repo = "doom-modeline";
  81. rev = "2e65c9d06b30cef156f7e74b773e67b487af9b24";
  82. sha256 = "1g9vhslgagkdwccwcac5xlpc1n4bi5806fdrc6yy6wmdmij5q7ji";
  83. };
  84. recipe = fetchurl {
  85. url = "https://raw.githubusercontent.com/milkypostman/melpa/f4f610757f85fb01bd9b1dd212ddbea8f34f3ecd/recipes/doom-modeline";
  86. sha256 = "0pscrhhgk4wpz1f2r94ficgan4f9blbhqzvav1wjahwp7fn5m29j";
  87. name = "recipe";
  88. };
  89. packageRequires = [
  90. all-the-icons
  91. dash
  92. eldoc-eval
  93. emacs
  94. projectile
  95. (shrink-path epkgs)
  96. ];
  97. meta = {
  98. homepage = "https://melpa.org/#/doom-modeline";
  99. license = lib.licenses.free;
  100. };
  101. }) {};
  102. in
  103. pkgs.emacsWithPackages (epkgs: (with epkgs.elpaPackages; [
  104. (exwm epkgs)
  105. undo-tree
  106. ]) ++ (with epkgs.melpaPackages; [
  107. anaconda-mode
  108. avy
  109. bar-cursor
  110. buttercup
  111. company
  112. company-anaconda
  113. company-nixos-options
  114. company-php
  115. company-quickhelp
  116. counsel
  117. counsel-projectile
  118. crux
  119. diminish
  120. dimmer
  121. docker
  122. dockerfile-mode
  123. (doom-modeline epkgs)
  124. emms
  125. expand-region
  126. exwm-edit
  127. flycheck
  128. git-timemachine
  129. gpastel
  130. gruvbox-theme
  131. helpful
  132. highlight-indentation
  133. hydra
  134. ibuffer-projectile
  135. iedit
  136. intero
  137. ivy
  138. ivy-hydra
  139. iy-go-to-char
  140. macrostep
  141. magit
  142. markdown-mode
  143. nix-mode
  144. no-littering
  145. org-bullets
  146. org-pomodoro
  147. org-tree-slide
  148. paredit
  149. php-mode
  150. projectile
  151. purescript-mode
  152. restclient
  153. shackle
  154. spaceline
  155. swiper
  156. use-package
  157. web-mode
  158. which-key
  159. yaml-mode
  160. ]) ++ (with epkgs.orgPackages; [
  161. org-plus-contrib
  162. ]) ++ [
  163. pkgs.notmuch
  164. ])