From b3344e2265e17012dbaec8d8f2af0e505653897d Mon Sep 17 00:00:00 2001 From: Akshay Date: Tue, 21 Sep 2021 21:26:02 +0530 Subject: build as flake --- .gitignore | 1 + flake.lock | 27 +++++++++++++++++++++++++ flake.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++ readme.md | 4 ++++ screenshots/plain-dark.png | Bin 241529 -> 0 bytes screenshots/plain-light.png | Bin 244260 -> 0 bytes 6 files changed, 80 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix delete mode 100644 screenshots/plain-dark.png delete mode 100644 screenshots/plain-light.png 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..af3204b --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1632176121, + "narHash": "sha256-N2oSOhbW38rbc53R1R8qXC/Xstht1PIsAcTzJfmCpTc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3397f0ede9ea2ded1f8b6fa689dda71a7a67b806", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-21.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bc16b7e --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +{ + + description = "Duotonic colorscheme for {neo,}vim"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05"; + }; + + outputs = + { self + , nixpkgs + , ... + } @ rest: + let + supportedSystems = [ "x86_64-linux" "x86_64-darwin" ]; + + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + + nixpkgsFor = forAllSystems (system: + import nixpkgs { + inherit system; + overlays = [ self.overlay ]; + } + ); + in + { + + overlay = final: prev: rec { + vim-colors-plain = + with final; pkgs.vimUtils.buildVimPlugin { + pname = "vim-colors-plain"; + version = "0.1.0"; + src = ./.; + }; + }; + + packages = forAllSystems (system: + { + inherit (nixpkgsFor."${system}") vim-colors-plain; + } + ); + + defaultPackage = + forAllSystems (system: self.packages."${system}".vim-colors-plain); + + }; + +} diff --git a/readme.md b/readme.md index 2a29c4c..6a6eb2d 100644 --- a/readme.md +++ b/readme.md @@ -11,3 +11,7 @@ the following directories: - vim: `.vim/plugin` - neovim: `.config/nvim/plugin` + +if you use nix/nixos, this repository provides a vim plugin +as a flake output, that you can import via +`builtins.getFlake`. diff --git a/screenshots/plain-dark.png b/screenshots/plain-dark.png deleted file mode 100644 index 4ed6ab6..0000000 Binary files a/screenshots/plain-dark.png and /dev/null differ diff --git a/screenshots/plain-light.png b/screenshots/plain-light.png deleted file mode 100644 index 4bc0c8f..0000000 Binary files a/screenshots/plain-light.png and /dev/null differ -- cgit v1.2.3