Skip to content

Commit

Permalink
habitat: 0.90.6 -> 1.6.614
Browse files Browse the repository at this point in the history
Bump version to fix build failure for ZHF (NixOS#199919)
  • Loading branch information
thenonameguy committed Nov 29, 2022
1 parent 6f8b75a commit 6cf3af1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 16 deletions.
51 changes: 35 additions & 16 deletions pkgs/applications/networking/cluster/habitat/default.nix
Original file line number Diff line number Diff line change
@@ -1,38 +1,57 @@
{ lib, fetchFromGitHub, rustPlatform, pkg-config
, libsodium, libarchive, openssl, zeromq }:
{ lib
, fetchFromGitHub
, rustPlatform
, pkg-config
, perl
, libsodium
, libarchive
, openssl
, zeromq
, protobuf
}:

rustPlatform.buildRustPackage rec {
pname = "habitat";
# Newer versions required protobuf, which requires some finesse to get to
# compile with the vendored protobuf crate.
version = "0.90.6";
version = "1.6.614";

src = fetchFromGitHub {
owner = "habitat-sh";
repo = "habitat";
rev = version;
sha256 = "0rwi0lkmhlq4i8fba3s9nd9ajhz2dqxzkgfp5i8y0rvbfmhmfd6b";
sha256 = "17yVH750pNfpBM+3t1IGuZcslyfFeKDZ+9dLbOt8Rs0=";
};

cargoSha256 = "1c058sjgd79ps8ahvxp25qyc3a6b2csb41vamrphv9ygai60mng6";
cargoSha256 = "14b6sV2QjlEqbDsJwnfbyRVUbeskacq39cSR1blYBrg=";

nativeBuildInputs = [ pkg-config ];
buildInputs = [ libsodium libarchive openssl zeromq ];
nativeBuildInputs = [
pkg-config
perl # used by openssl-sys to configure
];

cargoBuildFlags = ["--package hab"];
buildInputs = [
libarchive
openssl
zeromq
protobuf
];

checkPhase = ''
runHook preCheck
echo "Running cargo test"
cargo test --package hab
runHook postCheck
preBuild = ''
export PROTOC=${protobuf}/bin/protoc
export PROTOC_INCLUDE="${protobuf}/include";
'';

# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;

cargoBuildFlags = [ "--package hab" ];

# the test suite calls out to the public internet and tries to install busybox-static in multiple places
doCheck = false;

meta = with lib; {
description = "An application automation framework";
homepage = "https://www.habitat.sh";
license = licenses.asl20;
maintainers = with maintainers; [ rushmorem ];
platforms = [ "x86_64-linux" ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/components/builder-api-client/src/builder.rs b/components/builder-api-client/src/builder.rs
index a920bc950..31509f35f 100644
--- a/components/builder-api-client/src/builder.rs
+++ b/components/builder-api-client/src/builder.rs
@@ -1621,7 +1621,7 @@ mod tests {

#[tokio::test]
async fn package_search() {
- let client = BuilderAPIClient::new("http://test.com", "", "", None).expect("valid client");
+ let client = BuilderAPIClient::new("http://localhost", "", "", None).expect("valid client");

let sample_data = vec!["one_a", "one_b", "one_c", "one_d", "one_e", "two_a", "two_b",
"two_c", "two_d", "two_e",];

0 comments on commit 6cf3af1

Please sign in to comment.