2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform, pkg-config
|
2020-03-10 02:24:41 +00:00
|
|
|
, libsodium, libarchive, openssl, zeromq }:
|
2016-06-25 20:44:54 +01:00
|
|
|
|
2020-03-10 02:24:41 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "habitat";
|
2020-03-10 02:24:41 +00:00
|
|
|
# Newer versions required protobuf, which requires some finesse to get to
|
|
|
|
# compile with the vendored protobuf crate.
|
|
|
|
version = "0.90.6";
|
2016-06-25 20:44:54 +01:00
|
|
|
|
2016-06-26 19:31:24 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "habitat-sh";
|
|
|
|
repo = "habitat";
|
|
|
|
rev = version;
|
2020-03-10 02:24:41 +00:00
|
|
|
sha256 = "0rwi0lkmhlq4i8fba3s9nd9ajhz2dqxzkgfp5i8y0rvbfmhmfd6b";
|
2016-06-25 20:44:54 +01:00
|
|
|
};
|
|
|
|
|
2021-05-07 12:00:49 +01:00
|
|
|
cargoSha256 = "1c058sjgd79ps8ahvxp25qyc3a6b2csb41vamrphv9ygai60mng6";
|
2016-06-25 20:44:54 +01:00
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-03-10 02:24:41 +00:00
|
|
|
buildInputs = [ libsodium libarchive openssl zeromq ];
|
2016-06-25 20:44:54 +01:00
|
|
|
|
2017-02-19 02:23:58 +00:00
|
|
|
cargoBuildFlags = ["--package hab"];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
echo "Running cargo test"
|
|
|
|
cargo test --package hab
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-06-25 20:44:54 +01:00
|
|
|
description = "An application automation framework";
|
2020-03-10 02:24:41 +00:00
|
|
|
homepage = "https://www.habitat.sh";
|
2016-06-25 20:44:54 +01:00
|
|
|
license = licenses.asl20;
|
2020-03-10 02:24:41 +00:00
|
|
|
maintainers = with maintainers; [ rushmorem ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2016-06-25 20:44:54 +01:00
|
|
|
};
|
|
|
|
}
|