nixpkgs-suyu/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
999 B
Nix
Raw Normal View History

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 {
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
};
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; {
description = "A small library to manage encrypted secrets using asymmetric encryption";
2018-09-26 13:35:23 +02:00
license = licenses.mit;
homepage = "https://github.com/Shopify/ejson";
2018-09-26 13:35:23 +02:00
maintainers = [ maintainers.manveru ];
};
}