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