2022-11-02 22:02:43 +00:00
|
|
|
{ stdenv, lib, rustPlatform, fetchFromGitHub, makeWrapper, cargo-watch, zig, Security }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-lambda";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.12.0";
|
2022-11-02 22:02:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-27 09:42:12 +00:00
|
|
|
sha256 = "sha256-SgA2eKXZIPWbyJkopk8E9rTgkUWl6LWP2dw2fn3H8qc=";
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
cargoSha256 = "sha256-rTVc8zzbzLzP0LV8h7IWE1S+ZqDVfnO18iT0CrOrI9A=";
|
2022-11-02 22:02:43 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/cargo-lambda --prefix PATH : ${lib.makeBinPath [ cargo-watch zig ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# Disabled because it accesses the network.
|
|
|
|
"--skip test_download_example"
|
|
|
|
# Disabled because it makes assumptions about the file system.
|
|
|
|
"--skip test_target_dir_from_env"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Cargo subcommand to help you work with AWS Lambda";
|
|
|
|
homepage = "https://cargo-lambda.info";
|
|
|
|
license = licenses.mit;
|
2022-11-04 12:27:35 +00:00
|
|
|
maintainers = with maintainers; [ taylor1791 calavera ];
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
|
|
|
}
|