Skip to content

Commit

Permalink
apply bnjmnt4n's openssh patch
Browse files Browse the repository at this point in the history
  • Loading branch information
dln committed Sep 11, 2024
1 parent d002a5a commit 5eb51bd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 26 deletions.
21 changes: 2 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ dunce = "1.0.5"
either = "1.13.0"
esl01-renderdag = "0.3.0"
futures = "0.3.30"
git2 = { version = "0.19.0", features = [
git2 = { git = "https://github.com/bnjmnt4n/git2-rs.git", rev = "60e29ff0d", default-features = false, features = [
"https",
"ssh-openssh",
# Do *not* disable this feature even if you'd like dynamic linking. Instead,
# set the environment variable `LIBGIT2_NO_VENDOR=1` if dynamic linking must
# be used (this will override the Cargo feature), and allow static linking
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ fn map_git_error(err: git2::Error) -> CommandError {
successfully load certificates. Try setting it to the path of a directory that \
contains a `.ssh` directory."
} else {
"Jujutsu uses libssh2, which doesn't respect ~/.ssh/config. Does `ssh -F \
/dev/null` to the host work?"
"There was an error creating an SSH connection. Does `ssh -F /dev/null` to the \
host work?"
};

user_error_with_hint(err, hint)
Expand Down
9 changes: 5 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
];

cargoLock.lockFile = ./Cargo.lock;
cargoLock.outputHashes = {
"git2-0.19.0" = "sha256-fV8dFChGeDhb20bMyqefpAD5/+raQQ2sMdkEtlA1jaE=";
};
nativeBuildInputs = with pkgs; [
gzip
installShellFiles
Expand All @@ -96,11 +99,10 @@
openssh
] ++ linuxNativeDeps;
buildInputs = with pkgs; [
openssl zstd libgit2 libssh2
openssl zstd libgit2 openssh
] ++ darwinDeps;

ZSTD_SYS_USE_PKG_CONFIG = "1";
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
RUSTFLAGS = pkgs.lib.optionalString pkgs.stdenv.isLinux "-C link-arg=-fuse-ld=mold";
NIX_JJ_GIT_HASH = self.rev or "";
CARGO_INCREMENTAL = "0";
Expand Down Expand Up @@ -150,7 +152,7 @@
ourRustVersion

# Foreign dependencies
openssl zstd libgit2 libssh2
openssl zstd libgit2
pkg-config

# Additional tools recommended by contributing.md
Expand All @@ -176,7 +178,6 @@
shellHook = ''
export RUST_BACKTRACE=1
export ZSTD_SYS_USE_PKG_CONFIG=1
export LIBSSH2_SYS_USE_PKG_CONFIG=1
export RUSTFLAGS="-Zthreads=0 ${rustLinkFlagsString}"
'';
Expand Down

0 comments on commit 5eb51bd

Please sign in to comment.