unison: reduce closure size when enableX11 = false

Before: /nix/store/ifqr2nhgrci0ixga4k7pk9l6mqdfsk5b-unison-2.53.2 354.3M
After: /nix/store/4cgr7fvqry0yrr8d76a5n0ykbm3wqx14-unison-2.53.2 40.9M

+5 -5
+5 -5
pkgs/applications/networking/sync/unison/default.nix
··· 6 , copyDesktopItems 7 , makeDesktopItem 8 , wrapGAppsHook 9 - , glib 10 , gsettings-desktop-schemas 11 , zlib 12 , enableX11 ? true ··· 26 27 strictDeps = true; 28 29 - nativeBuildInputs = [ glib wrapGAppsHook ocamlPackages.ocaml ] 30 - ++ lib.optional enableX11 copyDesktopItems; 31 - buildInputs = [ gsettings-desktop-schemas ncurses zlib ] 32 - ++ lib.optional stdenv.isDarwin Cocoa; 33 34 preBuild = lib.optionalString enableX11 '' 35 sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk3}"/lib/ocaml/*/site-lib/lablgtk3)|" src/Makefile.OCaml
··· 6 , copyDesktopItems 7 , makeDesktopItem 8 , wrapGAppsHook 9 , gsettings-desktop-schemas 10 , zlib 11 , enableX11 ? true ··· 25 26 strictDeps = true; 27 28 + nativeBuildInputs = [ ocamlPackages.ocaml ] 29 + ++ lib.optionals enableX11 [ copyDesktopItems wrapGAppsHook ]; 30 + buildInputs = [ ncurses zlib ] 31 + ++ lib.optionals enableX11 [ gsettings-desktop-schemas ] 32 + ++ lib.optionals stdenv.isDarwin [ Cocoa ]; 33 34 preBuild = lib.optionalString enableX11 '' 35 sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk3}"/lib/ocaml/*/site-lib/lablgtk3)|" src/Makefile.OCaml