From cfadc50cb293400fc299c997077f19a97b4f5e75 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Mon, 6 Mar 2023 22:06:29 -0800 Subject: [PATCH] nix: use packaged builds of foreign dependencies Speeds up the build and reduces the size of the resulting package. --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 49559d319..418f70c84 100644 --- a/flake.nix +++ b/flake.nix @@ -56,12 +56,14 @@ makeWrapper pkg-config ]; - buildInputs = with pkgs; [ openssl dbus sqlite ] + buildInputs = with pkgs; [ openssl dbus sqlite zstd libgit2 libssh2 ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.SystemConfiguration libiconv - ]; + ]; + ZSTD_SYS_USE_PKG_CONFIG = "1"; + LIBSSH2_SYS_USE_PKG_CONFIG = "1"; postInstall = '' $out/bin/jj util mangen > ./jj.1 installManPage ./jj.1