git.iko.soy/typeable/nixpkgs
on master help sign in
vim_configurable: Make disabling guiSupport easier

Now it's possible to use in an overlay `guiSupport` set to `false` (boolean) and doing so will disable many X related dependencies from being used and the closure would be reduced automatically - Close #116716.

commitc49d77a600fc38601a421d12440b9867b7402e85 authorDoron Behar <doron.behar@gmail.com> dateSat 20 Mar 2021, 13:01 (6 years ago) parent1ae5e50
1 file changed+17−3
pkgs/applications/editors/vim/configurable.nix+17−3
pkgs/applications/editors/vim/configurable.nix+17−3
@@ -75,7 +75,6 @@ in stdenv.mkDerivation rec {
7575 patches = [ ./cflags-prune.diff ] ++ lib.optional ftNixSupport ./ft-nix-support.patch;
7676
7777 configureFlags = [
78− "--enable-gui=${guiSupport}"
7978 "--with-features=${features}"
8079 "--disable-xsmp" # XSMP session management
8180 "--disable-xsmp_interact" # XSMP interaction
@@ -95,6 +94,7 @@ in stdenv.mkDerivation rec {
9594 "--disable-carbon_check"
9695 "--disable-gtktest"
9796 ]
97+ ++ lib.optional (guiSupport == "gtk2" || guiSupport == "gtk3") "--enable-gui=${guiSupport}"
9898 ++ lib.optional stdenv.isDarwin
9999 (if darwinSupport then "--enable-darwin" else "--disable-darwin")
100100 ++ lib.optionals luaSupport [
@@ -127,8 +127,22 @@ in stdenv.mkDerivation rec {
127127 ++ lib.optional (guiSupport == "gtk3") wrapGAppsHook
128128 ;
129129
130− buildInputs = [ ncurses libX11 libXext libSM libXpm libXt libXaw libXau
131− libXmu glib libICE ]
130+ buildInputs = [
131+ ncurses
132+ glib
133+ ]
134+ # All X related dependencies
135+ ++ lib.optionals (guiSupport == "gtk2" || guiSupport == "gtk3") [
136+ libSM
137+ libICE
138+ libX11
139+ libXext
140+ libXpm
141+ libXt
142+ libXaw
143+ libXau
144+ libXmu
145+ ]
132146 ++ lib.optional (guiSupport == "gtk2") gtk2-x11
133147 ++ lib.optional (guiSupport == "gtk3") gtk3-x11
134148 ++ lib.optionals darwinSupport [ CoreServices CoreData Cocoa Foundation libobjc ]