git.iko.soy/typeable/nixpkgs
on master help sign in
Merge #22309: vim: allow building with gtk3
commit01751a944792fc4d381c91ed8b3fcacdbff41785 authorVladimír Čunát <vcunat@gmail.com> dateTue 31 Jan 2017, 09:40 (10 years ago) parent68b4a1fe01c15d
2 files changed+9−7
nixos/modules/services/x11/desktop-managers/gnome3.nix+5−2 pkgs/applications/editors/vim/configurable.nix+4−5
nixos/modules/services/x11/desktop-managers/gnome3.nix+5−2
@@ -78,7 +78,7 @@ in {
7878 };
7979
8080 debug = mkEnableOption "gnome-session debug messages";
81− };
81+ };
8282
8383 environment.gnome3.packageSet = mkOption {
8484 default = null;
@@ -86,7 +86,7 @@ in {
8686 description = "Which GNOME 3 package set to use.";
8787 apply = p: if p == null then pkgs.gnome3 else p;
8888 };
89−
89+
9090 environment.gnome3.excludePackages = mkOption {
9191 default = [];
9292 example = literalExample "[ pkgs.gnome3.totem ]";
@@ -125,6 +125,9 @@ in {
125125 services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
126126 services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ];
127127
128+ # If gnome3 is installed, build vim for gtk3 too.
129+ nixpkgs.config.vim.gui = "gtk3";
130+
128131 fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell_fonts ];
129132
130133 services.xserver.desktopManager.session = singleton
pkgs/applications/editors/vim/configurable.nix+4−5
@@ -1,7 +1,7 @@
11# TODO tidy up eg The patchelf code is patching gvim even if you don't build it..
22# but I have gvim with python support now :) - Marc
33args@{ source ? "default", callPackage, fetchurl, stdenv, ncurses, pkgconfig, gettext
4−, composableDerivation, writeText, lib, config, glib, gtk2, python, perl, tcl, ruby
4+, composableDerivation, writeText, lib, config, glib, gtk2, gtk3, python, perl, tcl, ruby
55, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
66, libICE
77
@@ -69,8 +69,8 @@ composableDerivation {
6969 nativeBuildInputs = [ pkgconfig ];
7070
7171 buildInputs
72− = [ ncurses gtk2 libX11 libXext libSM libXpm libXt libXaw libXau
73− libXmu glib libICE ];
72+ = [ ncurses libX11 libXext libSM libXpm libXt libXaw libXau
73+ libXmu glib libICE ] ++ (if args.gui == "gtk3" then [gtk3] else [gtk2]);
7474
7575 # most interpreters aren't tested yet.. (see python for example how to do it)
7676 flags = {
@@ -149,7 +149,7 @@ composableDerivation {
149149 ftNixSupport = config.vim.ftNix or true;
150150 };
151151
152− #--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
152+ #--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gtk3/gnome/gnome2/motif/athena/neXtaw/photon/carbon
153153 /*
154154 // edf "gtk_check" "gtk_check" { } #If auto-select GUI, check for GTK default=yes
155155 // edf "gtk2_check" "gtk2_check" { } #If GTK GUI, check for GTK+ 2 default=yes
@@ -171,4 +171,3 @@ composableDerivation {
171171
172172 dontStrip = 1;
173173})
174−