nixpkgs/pkgs/by-name/ha/habitat/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

67 lines
1.6 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, protobuf
, libsodium
, openssl
, xz
, zeromq
, cacert
}:
rustPlatform.buildRustPackage rec {
pname = "habitat";
version = "1.6.848";
src = fetchFromGitHub {
owner = "habitat-sh";
repo = "habitat";
rev = version;
hash = "sha256-oK9ZzENwpEq6W1qnhSgkr7Rhy7Fxt/BS4U5nxecyPu8=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"clap-2.33.1" = "sha256-ixyNr91VNB2ce2cIr0CdPmvKYRlckhKLeaSbqxouIAY=";
"configopt-0.1.0" = "sha256-76MeSoRD796ZzBqX3CoDJnunekVo2XfctpxrpspxmAU=";
"rants-0.6.0" = "sha256-B8uDoiqddCki3j7aC8kilEcmJjvB4ICjZjjTun2UEkY=";
"retry-1.0.0" = "sha256-ZaHnzOCelV4V0+MTIbH3DXxdz8QZVgcMq2YeV0S6X6o=";
"structopt-0.3.15" = "sha256-0vIX7J7VktKytT3ZnOm45qPRMHDkdJg20eU6pZBIH+Q=";
"zmq-0.9.2" = "sha256-bsDCPYLb9hUr6htPQ7rSoasKAqoWBx5FiEY1gOOtdJQ=";
};
};
nativeBuildInputs = [
pkg-config
protobuf
];
buildInputs = [
libsodium
openssl
xz
zeromq
];
cargoBuildFlags = [ "-p" "hab" ];
cargoTestFlags = cargoBuildFlags;
env = {
OPENSSL_NO_VENDOR = true;
SODIUM_USE_PKG_CONFIG = true;
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
};
meta = with lib; {
description = "Application automation framework";
homepage = "https://www.habitat.sh";
changelog = "https://github.com/habitat-sh/habitat/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ rushmorem qjoly ];
mainProgram = "hab";
platforms = [ "x86_64-linux" ];
};
}