Unverified Commit 1b94c25f authored by Henri Menke's avatar Henri Menke
Browse files

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
parent e5f6200d
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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