eb0e1d8c5d
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.
15 lines
287 B
Nix
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 ];
|
|
}
|