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