2020-03-10 02:24:41 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig
|
|
|
|
, 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
|
|
|
};
|
|
|
|
|
2020-03-10 02:24:41 +00:00
|
|
|
cargoSha256 = "08sncz0jgsr2s821j3s4bk7d54xqwmnld7m57avavym1xqvsnbmy";
|
2016-06-25 20:44:54 +01:00
|
|
|
|
2016-06-26 19:31:24 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
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
|
|
|
|
'';
|
|
|
|
|
2020-03-10 02:24:41 +00:00
|
|
|
meta = with stdenv.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
|
|
|
};
|
|
|
|
}
|