-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
66 lines (60 loc) · 1.48 KB
/
flake.nix
File metadata and controls
66 lines (60 loc) · 1.48 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
{
description = "A modern, minimal(ish) Vim distribution";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
...
}:
let
inherit (builtins) attrValues;
in
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
## The Vim version.
##
#@ String
version = "9.1.2050";
## The Vim source.
##
#@ Derivation
src = pkgs.fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
hash = "sha256-d/fiDTvC1pAIvzs8kdO4tC7gQJz13feLPXFiUxXdoG0=";
};
## The Vim package.
##
#@ Package
package = pkgs.vim-full.overrideAttrs (_: {
inherit version src;
});
## The Vim derivation.
##
#@ Package
vim = package.customize {
vimrcConfig.customRC = ''
set runtimepath=${self},$VIMRUNTIME,${self}/after
set packpath=${self},$VIMRUNTIME,${self}/after
'';
};
in
{
devShell = pkgs.mkShell {
buildInputs = attrValues { inherit vim; };
shellHook = ''
echo "Entering the 'github:52/vim' development environment"
echo "Execute 'vim' or 'gvim' to open the build"
'';
};
}
);
}