Created
April 21, 2016 10:49
-
-
Save aaronlevin/9a933624d3fda83b01b06acb2aeea0a6 to your computer and use it in GitHub Desktop.
Use Nix to build vim with +python support + custom python libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I wanted to use ensime with vim, which requires vim + python + some python packages (websocket_client + sexpdata) | |
# unfortunately, nix would build vim with a python that didn't have access to my system libraries (for referential transperancy) | |
# so I needed to provide to `vim_configurable.nix` the right python to use *and* enable python, lua, etc. support. | |
# I also wanted to keep my `.vimrc` separate because some of the vim packages I use weren't available. | |
# | |
# install via: `nix-env -f '<nixpkgs>' -iA myCoolVim` or `nix-env -I nixpkgs=/path/to/your/nixpkgs -f '<nixpkgs>' -iA myCoolVim` | |
# | |
# out put of `vim --version` below. | |
{ | |
packageOverrides = super: let self = super.pkgs; in | |
{ | |
myPy = self.python.buildEnv.override { | |
extraLibs = [ self.pythonPackages.websocket_client self.pythonPackages.sexpdata ]; | |
ignoreCollisions = true; | |
}; | |
myCoolVim = self.lib.overrideDerivation (self.vim_configurable.override { python = self.myPy; }) (o: { | |
aclSupport = false; | |
cscopeSupport = true; | |
darwinSupport = false; | |
fontsetSupport = true; | |
ftNixSupport = true; | |
gpmSupport = true; | |
gui = false; | |
hangulinputSupport = false; | |
luaSupport = true; | |
multibyteSupport = true; | |
mzschemeSupport = true; | |
netbeansSupport = false; | |
nlsSupport = false; | |
perlSupport = false; | |
pythonSupport = true; | |
rubySupport = true; | |
sniffSupport = false; | |
tclSupport = false; | |
ximSupport = false; | |
xsmpSupport = false; | |
xsmp_interactSupport = false; | |
}); | |
}; | |
} | |
# ☭ vim --version | |
# VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 1 1970 00:00:01) | |
# Included patches: 1-826 | |
# Compiled by aaronlevin | |
# Huge version with GTK2 GUI. Features included (+) or not (-): | |
# +acl +farsi +mouse_netterm +syntax | |
# +arabic +file_in_path +mouse_sgr +tag_binary | |
# +autocmd +find_in_path -mouse_sysmouse +tag_old_static | |
# +balloon_eval +float +mouse_urxvt -tag_any_white | |
# +browse +folding +mouse_xterm -tcl | |
# ++builtin_terms -footer +multi_byte +terminfo | |
# +byte_offset +fork() +multi_lang +termresponse | |
# +cindent -gettext -mzscheme +textobjects | |
# +clientserver -hangul_input +netbeans_intg +title | |
# +clipboard +iconv +path_extra +toolbar | |
# +cmdline_compl +insert_expand -perl +user_commands | |
# +cmdline_hist +jumplist +persistent_undo +vertsplit | |
# +cmdline_info +keymap +postscript +virtualedit | |
# +comments +langmap +printer +visual | |
# +conceal +libcall +profile +visualextra | |
# +cryptv +linebreak +python +viminfo | |
# +cscope +lispindent -python3 +vreplace | |
# +cursorbind +listcmds +quickfix +wildignore | |
# +cursorshape +localmap +reltime +wildmenu | |
# +dialog_con_gui +lua +rightleft +windows | |
# +diff +menu +ruby +writebackup | |
# +digraphs +mksession +scrollbind +X11 | |
# +dnd +modify_fname +signs -xfontset | |
# -ebcdic +mouse +smartindent -xim | |
# +emacs_tags +mouseshape -sniff -xsmp | |
# +eval +mouse_dec +startuptime +xterm_clipboard | |
# +ex_extra -mouse_gpm +statusline -xterm_save | |
# +extra_search -mouse_jsbterm -sun_workshop +xpm | |
# system vimrc file: "$VIM/vimrc" | |
# user vimrc file: "$HOME/.vimrc" | |
# 2nd user vimrc file: "~/.vim/vimrc" | |
# user exrc file: "$HOME/.exrc" | |
# system gvimrc file: "$VIM/gvimrc" | |
# user gvimrc file: "$HOME/.gvimrc" | |
# 2nd user gvimrc file: "~/.vim/gvimrc" | |
# system menu file: "$VIMRUNTIME/menu.vim" | |
# fall-back for $VIM: " | |
# /nix/store/699nhhzfwcppbygc2sxg8f4mkn0s2aqr-vim_configurable-7.4.826/share/vim | |
# " | |
# Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/nix/store/857sfqpl6fyixih2vcw89lwpyahx14d1-gtk+-2.24.29-dev/include/gtk-2.0 -I/nix/store/xsmzpx4qcyhrx506gm7hz0qxlixixb1j-gtk+-2.24.29/lib/gtk-2.0/include -I/nix/store/v84fvqd556j9q64d0n9hc4zn23y8ccqd-glib-2.46.2-dev/include/glib-2.0 -I/nix/store/4yqw3m09xrhv8ykfdxzjds41d3c7klfj-glib-2.46.2/lib/glib-2.0/include -I/nix/store/ddljnw1f7lqn0jpy8rapmi4n1n579rx1-cairo-1.14.6-dev/include/cairo -I/nix/store/36m0i7w0k2fi03ji5wpi0i4xbpk3mkhc-freetype-2.6.2-dev/include/freetype2 -I/nix/store/36m0i7w0k2fi03ji5wpi0i4xbpk3mkhc-freetype-2.6.2-dev/include -I/nix/store/0v3d3hsdnazn6lscpmffcyn67qqwhk3x-fontconfig-2.11.1-dev/include -I/nix/store/vjqh3yg73wg6xjjicnw33d6lbkkm1l69-expat-2.1.0-dev/include -I/nix/store/36m0i7w0k2fi03ji5wpi0i4xbpk3mkhc-freetype-2.6.2-dev/include/freetype2 -I/nix/store/l4nxxf2qkbplk7nnbiiabafj5l0ksswg-pango-1.38.1-dev/include/pango-1.0 -I/nix/store/n80dqxzddqlxrba8n4nkbwbjyrrnsa7j-gdk-pixbuf-2.32.3-dev/include/gdk-pixbuf-2.0 -I/nix/store/kbfdb7pli3gjlxdk8dsn68xcqll6x5d1-atk-2.18.0-dev/include/atk-1.0 -I/usr/local/include -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 | |
# Linking: gcc -L/nix/store/xsmzpx4qcyhrx506gm7hz0qxlixixb1j-gtk+-2.24.29/lib -L/nix/store/4yqw3m09xrhv8ykfdxzjds41d3c7klfj-glib-2.46.2/lib -L/nix/store/292jvr8myz52gydi5z6san2dyndingg2-cairo-1.14.6/lib -L/nix/store/i801jlsjxfg48kq0dlvh9fb30jpaiwpd-fontconfig-2.11.1-lib/lib -L/nix/store/97bpv541iyydvp0qc1vnvdka3grzwspb-freetype-2.6.2/lib -L/nix/store/hlpsvdpdk5sb2y6g0hlhdrvp9fl3ffxf-pango-1.38.1/lib -L/nix/store/0mz4p7pm5acvldp79ch6m1bkqbniz6r0-gdk-pixbuf-2.32.3/lib -L/nix/store/rq3r1hhsk6214bvcjmvi68187iqxp1fc-atk-2.18.0/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -L/usr/local/lib -Wl,--as-needed -o vim -L/nix/store/xsmzpx4qcyhrx506gm7hz0qxlixixb1j-gtk+-2.24.29/lib -L/nix/store/4yqw3m09xrhv8ykfdxzjds41d3c7klfj-glib-2.46.2/lib -L/nix/store/292jvr8myz52gydi5z6san2dyndingg2-cairo-1.14.6/lib -L/nix/store/i801jlsjxfg48kq0dlvh9fb30jpaiwpd-fontconfig-2.11.1-lib/lib -L/nix/store/97bpv541iyydvp0qc1vnvdka3grzwspb-freetype-2.6.2/lib -L/nix/store/hlpsvdpdk5sb2y6g0hlhdrvp9fl3ffxf-pango-1.38.1/lib -L/nix/store/0mz4p7pm5acvldp79ch6m1bkqbniz6r0-gdk-pixbuf-2.32.3/lib -L/nix/store/rq3r1hhsk6214bvcjmvi68187iqxp1fc-atk-2.18.0/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lm -lncurses -lnsl -ldl -L/nix/store/s9lw3njm82hijgf8xbrvkqvz2y80aash-lua-5.1.5/lib -llua -L/nix/store/b4k601iaixg66fkxxxi09rlx2j4p1s66-python-2.7.11/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-R/nix/store/hl825hpk28qbzx61nbn9ab8sd8y8j18y-ruby-2.3.0-p0/lib -L/nix/store/hl825hpk28qbzx61nbn9ab8sd8y8j18y-ruby-2.3.0-p0/lib -lruby -lpthread -ldl -lcrypt -lm -L/nix/store/hl825hpk28qbzx61nbn9ab8sd8y8j18y-ruby-2.3.0-p0/lib |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment