tvl-depot/tools/simple_vim/default.nix
William Carroll eb0e1d8c5d Prefer builtins.path
Following the advice of Domen's nix.dev anti-patterns, I'm preferring something
like...

```nix
builtins.path { path = /path/to/some.where; name = "some.where"; }
```

...to

```nix
/path/to/some/where
```

While the former is more verbose, it will fail to build when the path doesn't
exist, which I prefer.
2020-08-27 17:31:15 +01:00

15 lines
287 B
Nix

{ pkgs, ... }:
let
configVim = builtins.path {
path = ./config.vim;
name = "config.vim";
};
script = pkgs.writeShellScriptBin "simple_vim" ''
${pkgs.vim}/bin/vim -u ${configVim}
'';
in pkgs.stdenv.mkDerivation {
name = "simple_vim";
buildInputs = [ script ];
}