-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (65 loc) · 1.99 KB
/
flake.nix
File metadata and controls
70 lines (65 loc) · 1.99 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
description = "Vim plugin for email messages written in MML.";
inputs = {
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:soywod/nixpkgs/init-mml";
utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; };
customRC = ''
syntax on
filetype plugin on
'';
in
rec {
# nix build
packages.default = pkgs.vimUtils.buildVimPlugin {
name = "mml";
namePrefix = "";
src = self;
buildInputs = with pkgs; [ mml ];
postPatch = with pkgs; ''
substituteInPlace plugin/mml.vim \
--replace "mml_default_executable = 'mml'" "mml_default_executable = '${mml}/bin/mml'"
'';
};
# nix develop
devShell = pkgs.mkShell {
buildInputs = self.packages.${system}.default.buildInputs;
nativeBuildInputs = with pkgs; [
# Nix LSP + formatter
rnix-lsp
nixpkgs-fmt
# Vim LSP
nodejs
nodePackages.vim-language-server
# Editors
((vim_configurable.override { }).customize {
name = "vim";
vimrcConfig = {
inherit customRC;
packages.myplugins = {
start = [ self.packages.${system}.default ];
};
};
})
(neovim.override {
configure = {
inherit customRC;
packages.myPlugins = {
start = [ self.packages.${system}.default ];
};
};
})
];
};
});
}