Merge #22309: vim: allow building with gtk3

+9 -7
+5 -2
nixos/modules/services/x11/desktop-managers/gnome3.nix
··· 78 78 }; 79 79 80 80 debug = mkEnableOption "gnome-session debug messages"; 81 - }; 81 + }; 82 82 83 83 environment.gnome3.packageSet = mkOption { 84 84 default = null; ··· 86 86 description = "Which GNOME 3 package set to use."; 87 87 apply = p: if p == null then pkgs.gnome3 else p; 88 88 }; 89 - 89 + 90 90 environment.gnome3.excludePackages = mkOption { 91 91 default = []; 92 92 example = literalExample "[ pkgs.gnome3.totem ]"; ··· 124 124 hardware.bluetooth.enable = mkDefault true; 125 125 services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center 126 126 services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ]; 127 + 128 + # If gnome3 is installed, build vim for gtk3 too. 129 + nixpkgs.config.vim.gui = "gtk3"; 127 130 128 131 fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell_fonts ]; 129 132
+4 -5
pkgs/applications/editors/vim/configurable.nix
··· 1 1 # TODO tidy up eg The patchelf code is patching gvim even if you don't build it.. 2 2 # but I have gvim with python support now :) - Marc 3 3 args@{ 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 5 5 , libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu 6 6 , libICE 7 7 ··· 69 69 nativeBuildInputs = [ pkgconfig ]; 70 70 71 71 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]); 74 74 75 75 # most interpreters aren't tested yet.. (see python for example how to do it) 76 76 flags = { ··· 149 149 ftNixSupport = config.vim.ftNix or true; 150 150 }; 151 151 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 153 153 /* 154 154 // edf "gtk_check" "gtk_check" { } #If auto-select GUI, check for GTK default=yes 155 155 // edf "gtk2_check" "gtk2_check" { } #If GTK GUI, check for GTK+ 2 default=yes ··· 171 171 172 172 dontStrip = 1; 173 173 }) 174 -