2024-06-05 15:53:02 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nix-update-script, testers, callPackage, ejson2env }:
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ejson2env";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "2.0.6";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-VXkWmmX+4D+j9ODSEeJJbIx+Bfni9d2X22BFQIe4kwk=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
vendorHash = "sha256-7oy8bCegsvv35zyo2aTFMSGZMFkArmxy0rOpK6WlubI=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
ldflags = [
|
2023-03-04 12:14:45 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
2022-04-27 09:35:20 +00:00
|
|
|
"-X main.version=${version}"
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests = {
|
|
|
|
version = testers.testVersion { package = ejson2env; };
|
|
|
|
decryption = callPackage ./test-decryption.nix {};
|
|
|
|
};
|
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "Decrypt EJSON secrets and export them as environment variables";
|
2022-03-05 16:20:37 +00:00
|
|
|
homepage = "https://github.com/Shopify/ejson2env";
|
|
|
|
maintainers = with maintainers; [ viraptor ];
|
|
|
|
license = licenses.mit;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "ejson2env";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
}
|