1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 17:41:12 +00:00
nixpkgs/pkgs/applications/editors/vim/wrapper.nix
2014-03-10 23:40:59 +01:00

33 lines
681 B
Nix

{ stdenv, makeWrapper, writeText, vim, vimrc }:
let
vimrcfile = writeText "vimrc" vimrc;
p = builtins.parseDrvName vim.name;
in stdenv.mkDerivation rec {
name = "${p.name}-with-vimrc-${p.version}";
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;
};
}