about summary refs log tree commit diff
path: root/modules/darwin/vim/default.nix
blob: 4c3f7e17d1a22f49acdda18e1e7cb5329657e62e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  config,
  lib,
  pkgs,
  ...
}:
with lib;
let
  cfg = config.nixfiles.modules.vim;
in
{
  config = mkIf cfg.enable {
    programs.vim.package =
      (pkgs.macvim.overrideAttrs (
        _: _: {
          # Too much of a hassle to selectively override this. Let's just
          # explicitly override everything.
          configureFlags = [
            "--disable-luainterp"
            "--disable-python3interp"
            "--disable-sparkle"
            "--enable-gui=macvim"
            "--with-compiledby=Nix"
            "--with-features=huge"
            "--with-tlib=ncurses"
            "--without-local-dir"
          ];
        }
      )).configure
        (
          with cfg;
          {
            customRC = rc;
            packages.myVimPackage.start = plugins;
          }
        );
  };
}

Consider giving Nix/NixOS a try! <3