2022-05-27 11:39:08 +00:00
|
|
|
{ lib, bundlerEnv, ruby, buildGoModule, fetchFromGitHub }:
|
2018-09-26 11:35:23 +00:00
|
|
|
let
|
|
|
|
# needed for manpage generation
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "ejson-gems";
|
|
|
|
gemdir = ./.;
|
|
|
|
inherit ruby;
|
|
|
|
};
|
2022-05-27 11:39:08 +00:00
|
|
|
in
|
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "ejson";
|
2022-05-27 11:39:08 +00:00
|
|
|
version = "1.3.3";
|
2018-09-26 11:35:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "ejson";
|
2022-05-27 11:39:08 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-M2Gk+/l1tNlIAe1/fR1WLEOey+tjCUmMAujc76gmeZA=";
|
2018-09-26 11:35:23 +00:00
|
|
|
};
|
|
|
|
|
2023-09-13 04:44:46 +00:00
|
|
|
vendorHash = "sha256-9+x7HrbXRoS/7ZADWwhsbynQLr3SyCbcsp9QnSubov0=";
|
2022-05-27 11:39:08 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ gems ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
|
2018-09-26 11:35:23 +00:00
|
|
|
# set HOME, otherwise bundler will insert stuff in the manpages
|
|
|
|
postBuild = ''
|
2022-05-27 11:39:08 +00:00
|
|
|
HOME=$PWD make man SHELL=$SHELL
|
2018-09-26 11:35:23 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r build/man $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-11 05:55:05 +00:00
|
|
|
description = "A small library to manage encrypted secrets using asymmetric encryption";
|
2018-09-26 11:35:23 +00:00
|
|
|
license = licenses.mit;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/Shopify/ejson";
|
2018-09-26 11:35:23 +00:00
|
|
|
maintainers = [ maintainers.manveru ];
|
|
|
|
};
|
|
|
|
}
|