about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-02-12T18·05+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-02-12T18·05+0000
commit072be0befdf80e63d49557acde954853ffecba92 (patch)
tree01ee915ba69f6b144c343f640cec87f7052fc5e5
parentfc8283ff6eee127ed8c46f22357348306284d8f8 (diff)
Nixify simple_vim idea
I previously had an alias defined as `simple_vim`, which would start an instance
of Vim with a bare bones config. I had a to-do to Nixify it. That is
now (mostly) to-done.

When I try and install it with `nix-env -f ~/briefcase -iA tools.simple_vim`,
Nix fails and says that pkgs.stdenv is undefined. I will need to fix this one
day, but it is neither important nor urgent...
-rw-r--r--tools/simple_vim/config.vim (renamed from configs/shared/.config/nvim/simple.vim)0
-rw-r--r--tools/simple_vim/default.nix10
2 files changed, 10 insertions, 0 deletions
diff --git a/configs/shared/.config/nvim/simple.vim b/tools/simple_vim/config.vim
index ea40964ee803..ea40964ee803 100644
--- a/configs/shared/.config/nvim/simple.vim
+++ b/tools/simple_vim/config.vim
diff --git a/tools/simple_vim/default.nix b/tools/simple_vim/default.nix
new file mode 100644
index 000000000000..7ea0b5ebc8a1
--- /dev/null
+++ b/tools/simple_vim/default.nix
@@ -0,0 +1,10 @@
+{ pkgs ? import <nixpkgs> {}, ... }:
+
+let
+  script = pkgs.writeShellScriptBin "simple_vim" ''
+    ${pkgs.vim}/bin/vim -u ${./config.vim}
+  '';
+in pkgs.stdenv.mkDerivation {
+  name = "simple_vim";
+  buildInputs = [ script ];
+}