2018-09-26 12:35:23 +01:00
|
|
|
{ lib, bundlerEnv, ruby, buildGoPackage, fetchFromGitHub }:
|
|
|
|
let
|
|
|
|
# needed for manpage generation
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "ejson-gems";
|
|
|
|
gemdir = ./.;
|
|
|
|
inherit ruby;
|
|
|
|
};
|
|
|
|
in buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ejson";
|
2019-05-02 22:58:48 +01:00
|
|
|
version = "1.2.1";
|
2018-09-26 12:35:23 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ gems ];
|
|
|
|
|
|
|
|
goPackagePath = "github.com/Shopify/ejson";
|
|
|
|
subPackages = [ "cmd/ejson" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Shopify";
|
|
|
|
repo = "ejson";
|
|
|
|
inherit rev;
|
2019-05-02 22:58:48 +01:00
|
|
|
sha256 = "09356kp059hbzmqpzlz4b3agg93yqqygh5l5ddbxcsaqx4qiwdr7";
|
2018-09-26 12:35:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# set HOME, otherwise bundler will insert stuff in the manpages
|
|
|
|
postBuild = ''
|
|
|
|
cd go/src/$goPackagePath
|
|
|
|
HOME=$PWD make man
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r build/man $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "A small library to manage encrypted secrets using asymmetric encryption";
|
2018-09-26 12:35:23 +01:00
|
|
|
license = licenses.mit;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Shopify/ejson";
|
2018-09-26 12:35:23 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.manveru ];
|
|
|
|
};
|
|
|
|
}
|