2022-06-16 17:23:12 +00:00
|
|
|
{ lib, bundlerEnv, ruby, buildGoModule, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
|
|
|
# needed for manpage generation
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "ejson-gems";
|
|
|
|
gemdir = ./.;
|
|
|
|
inherit ruby;
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
in
|
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ejson";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "ejson";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-M2Gk+/l1tNlIAe1/fR1WLEOey+tjCUmMAujc76gmeZA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-9+x7HrbXRoS/7ZADWwhsbynQLr3SyCbcsp9QnSubov0=";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ gems ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# set HOME, otherwise bundler will insert stuff in the manpages
|
|
|
|
postBuild = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
HOME=$PWD make man SHELL=$SHELL
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r build/man $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Small library to manage encrypted secrets using asymmetric encryption";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ejson";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/Shopify/ejson";
|
|
|
|
maintainers = [ maintainers.manveru ];
|
|
|
|
};
|
|
|
|
}
|