diff --git a/pkgs/applications/networking/cluster/habitat/chroot-env.nix b/pkgs/applications/networking/cluster/habitat/chroot-env.nix deleted file mode 100644 index 7d6b3749904b..000000000000 --- a/pkgs/applications/networking/cluster/habitat/chroot-env.nix +++ /dev/null @@ -1,9 +0,0 @@ -# TODO: Drop once https://github.com/habitat-sh/habitat/issues/994 -# is resolved. -{ habitat, libsodium, libarchive, openssl, buildFHSUserEnv }: - -buildFHSUserEnv { - name = "habitat-sh"; - targetPkgs = pkgs: [ habitat libsodium libarchive openssl ]; - runScript = "bash"; -} diff --git a/pkgs/applications/networking/cluster/habitat/default.nix b/pkgs/applications/networking/cluster/habitat/default.nix index da82dac00191..605312611404 100644 --- a/pkgs/applications/networking/cluster/habitat/default.nix +++ b/pkgs/applications/networking/cluster/habitat/default.nix @@ -5,23 +5,30 @@ with rustPlatform; buildRustPackage rec { name = "habitat-${version}"; - version = "0.8.0"; + version = "0.30.2"; src = fetchFromGitHub { owner = "habitat-sh"; repo = "habitat"; rev = version; - sha256 = "1h9wv2v4hcv79jkkjf8j96lzxni9d51755zfflfr5s3ayaip7rzj"; + sha256 = "0pqrm85pd9hqn5fwqjbyyrrfh4k7q9mi9qy9hm8yigk5l8mw44y1"; }; - sourceRoot = "habitat-${version}-src/components/hab"; - - depsSha256 = "1612jaw3zdrgrb56r755bb18l8szdmf1wi7p9lpv3d2gklqcb7l1"; + depsSha256 = "1ahfm5agvabqqqgjsyjb95xxbc7mng1mdyclcakwp1m1qdkxx9py"; buildInputs = [ libsodium libarchive openssl ]; nativeBuildInputs = [ pkgconfig ]; + cargoBuildFlags = ["--package hab"]; + + checkPhase = '' + runHook preCheck + echo "Running cargo test" + cargo test --package hab + runHook postCheck + ''; + meta = with lib; { description = "An application automation framework"; homepage = https://www.habitat.sh; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b180ad5dd640..ce1e08f54a97 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2436,7 +2436,6 @@ with pkgs; haveged = callPackage ../tools/security/haveged { }; habitat = callPackage ../applications/networking/cluster/habitat { }; - habitat-sh = callPackage ../applications/networking/cluster/habitat/chroot-env.nix { }; hardlink = callPackage ../tools/system/hardlink { };