aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--flake.lock26
-rw-r--r--flake.nix48
3 files changed, 75 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b2be92b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
result
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..744f64e
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,26 @@
1{
2 "nodes": {
3 "nixpkgs": {
4 "locked": {
5 "lastModified": 1674354362,
6 "narHash": "sha256-SPaNj2TaTuXXWzmCF6nNZ4VWgVxNtB+nXib9VbHwK5A=",
7 "owner": "NixOS",
8 "repo": "nixpkgs",
9 "rev": "218c4c526e746305ea3716da818f9d3ea693f4d4",
10 "type": "github"
11 },
12 "original": {
13 "owner": "NixOS",
14 "repo": "nixpkgs",
15 "type": "github"
16 }
17 },
18 "root": {
19 "inputs": {
20 "nixpkgs": "nixpkgs"
21 }
22 }
23 },
24 "root": "root",
25 "version": 7
26}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..bb8923e
--- /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";
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}