2013-08-29 22:27:48 +01:00
|
|
|
{ stdenv, makeWrapper, writeText, vim, vimrc }:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2013-08-29 22:27:48 +01:00
|
|
|
vimrcfile = writeText "vimrc" vimrc;
|
|
|
|
|
|
|
|
p = builtins.parseDrvName vim.name;
|
2013-08-29 22:27:48 +01:00
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2013-08-29 22:27:48 +01:00
|
|
|
name = "${p.name}-with-vimrc-${p.version}";
|
2013-08-29 22:27:48 +01:00
|
|
|
|
|
|
|
buildInputs = [ makeWrapper vim vimrcfile ];
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r ${vim}/* $out/
|
|
|
|
|
|
|
|
chmod u+w $out/bin
|
|
|
|
chmod u+w $out/share/vim
|
|
|
|
|
|
|
|
ln -s ${vimrcfile} $out/share/vim/vimrc
|
|
|
|
wrapProgram $out/bin/vim --set VIM "$out/share/vim"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The most popular clone of the VI editor";
|
|
|
|
homepage = http://www.vim.org;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|