Merge pull request #203841 from figsoda/cargo-lambda
cargo-lambda: avoid impurity
This commit is contained in:
commit
696705eed5
1 changed files with 21 additions and 8 deletions
|
@ -1,4 +1,12 @@
|
||||||
{ stdenv, lib, rustPlatform, fetchFromGitHub, makeWrapper, cargo-watch, zig, Security }:
|
{ lib
|
||||||
|
, rustPlatform
|
||||||
|
, fetchFromGitHub
|
||||||
|
, makeWrapper
|
||||||
|
, stdenv
|
||||||
|
, Security
|
||||||
|
, cargo-watch
|
||||||
|
, zig
|
||||||
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "cargo-lambda";
|
pname = "cargo-lambda";
|
||||||
|
@ -13,20 +21,25 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
cargoSha256 = "sha256-p3q5S6IFQQgNp/MHGSUE1DVLFyMLWDTv/dxrUACKSWo=";
|
cargoSha256 = "sha256-p3q5S6IFQQgNp/MHGSUE1DVLFyMLWDTv/dxrUACKSWo=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
checkFlags = [
|
||||||
|
# Disabled because it accesses the network.
|
||||||
|
"--skip=test_download_example"
|
||||||
|
];
|
||||||
|
|
||||||
|
# remove date from version output to make reproducible
|
||||||
|
postPatch = ''
|
||||||
|
rm crates/cargo-lambda-cli/build.rs
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/cargo-lambda --prefix PATH : ${lib.makeBinPath [ cargo-watch zig ]}
|
wrapProgram $out/bin/cargo-lambda --prefix PATH : ${lib.makeBinPath [ cargo-watch zig ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkFlags = [
|
CARGO_LAMBDA_BUILD_INFO = "(nixpkgs)";
|
||||||
# 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; {
|
meta = with lib; {
|
||||||
description = "A Cargo subcommand to help you work with AWS Lambda";
|
description = "A Cargo subcommand to help you work with AWS Lambda";
|
||||||
|
|
Loading…
Reference in a new issue