nix: use packaged builds of foreign dependencies

Speeds up the build and reduces the size of the resulting package.
This commit is contained in:
Benjamin Saunders 2023-03-06 22:06:29 -08:00
parent f546899252
commit cfadc50cb2

View file

@ -56,12 +56,14 @@
makeWrapper makeWrapper
pkg-config pkg-config
]; ];
buildInputs = with pkgs; [ openssl dbus sqlite ] buildInputs = with pkgs; [ openssl dbus sqlite zstd libgit2 libssh2 ]
++ lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration darwin.apple_sdk.frameworks.SystemConfiguration
libiconv libiconv
]; ];
ZSTD_SYS_USE_PKG_CONFIG = "1";
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
postInstall = '' postInstall = ''
$out/bin/jj util mangen > ./jj.1 $out/bin/jj util mangen > ./jj.1
installManPage ./jj.1 installManPage ./jj.1