From 1b94c25f63670389eab9554e608650a2da81bc8c Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Tue, 26 Sep 2023 09:41:28 +0200 Subject: [PATCH] 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 --- pkgs/applications/networking/sync/unison/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index 3612892548fc..10bc3ca68637 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -6,7 +6,6 @@ , copyDesktopItems , makeDesktopItem , wrapGAppsHook -, glib , gsettings-desktop-schemas , zlib , enableX11 ? true @@ -26,10 +25,11 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; - nativeBuildInputs = [ glib wrapGAppsHook ocamlPackages.ocaml ] - ++ lib.optional enableX11 copyDesktopItems; - buildInputs = [ gsettings-desktop-schemas ncurses zlib ] - ++ lib.optional stdenv.isDarwin Cocoa; + nativeBuildInputs = [ ocamlPackages.ocaml ] + ++ lib.optionals enableX11 [ copyDesktopItems wrapGAppsHook ]; + buildInputs = [ ncurses zlib ] + ++ lib.optionals enableX11 [ gsettings-desktop-schemas ] + ++ lib.optionals stdenv.isDarwin [ Cocoa ]; preBuild = lib.optionalString enableX11 '' sed -i "s|\(OCAMLOPT=.*\)$|\1 -I $(echo "${ocamlPackages.lablgtk3}"/lib/ocaml/*/site-lib/lablgtk3)|" src/Makefile.OCaml