2022-01-22 01:22:15 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl, stdenv, Security }:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rucredstash";
|
|
|
|
version = "0.9.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "psibi";
|
|
|
|
repo = "rucredstash";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1jwsj2y890nxpgmlfbr9hms2raspp5h89ykzsh014mf7lb3yxzwg";
|
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
};
|
|
|
|
|
2022-01-22 01:22:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ lib.optional stdenv.isDarwin Security;
|
|
|
|
|
|
|
|
# Disable tests since it requires network access and relies on the
|
|
|
|
# presence of certain AWS infrastructure
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# update Cargo.lock to work with openssl 3
|
|
|
|
postPatch = ''
|
|
|
|
ln -sf ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
2022-01-22 01:22:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Rust port for credstash. Manages credentials securely in AWS cloud";
|
|
|
|
homepage = "https://github.com/psibi/rucredstash";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ psibi ];
|
|
|
|
};
|
|
|
|
}
|