nixpkgs/pkgs/development/tools/ejson/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1001 B
Nix
Raw Normal View History

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 {
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
};
2022-05-27 11:39:08 +00:00
vendorSha256 = "sha256-9+x7HrbXRoS/7ZADWwhsbynQLr3SyCbcsp9QnSubov0=";
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; {
description = "A small library to manage encrypted secrets using asymmetric encryption";
2018-09-26 11:35:23 +00:00
license = licenses.mit;
homepage = "https://github.com/Shopify/ejson";
2018-09-26 11:35:23 +00:00
maintainers = [ maintainers.manveru ];
};
}