aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..e96f699
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,48 @@
1{
2
3 description = "Improved text objects for {neo,}vim";
4
5 inputs = {
6 nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
7 };
8
9 outputs =
10 { self
11 , nixpkgs
12 , ...
13 } @ rest:
14 let
15 supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
16
17 forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
18
19 nixpkgsFor = forAllSystems (system:
20 import nixpkgs {
21 inherit system;
22 overlays = [ self.overlay ];
23 }
24 );
25 in
26 {
27
28 overlay = final: prev: rec {
29 better-text-objs =
30 with final; pkgs.vimUtils.buildVimPlugin {
31 pname = "better-text-objs";
32 version = "0.1.0";
33 src = ./.;
34 };
35 };
36
37 packages = forAllSystems (system:
38 {
39 inherit (nixpkgsFor."${system}") better-text-objs;
40 }
41 );
42
43 defaultPackage =
44 forAllSystems (system: self.packages."${system}".better-text-objs);
45
46 };
47
48}