nixpkgs/pkgs/development/tools/cddl/default.nix
2024-01-06 19:41:19 +01:00

41 lines
956 B
Nix

{ lib
, bundlerApp
, bundlerUpdateScript
, makeBinaryWrapper
}:
bundlerApp rec {
pname = "cddl";
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = lib.recursiveUpdate (import ./gemset.nix) ({
"cddl" = {
dontBuild = false;
# setting env vars is not supported by patchShebangs
postPatch = ''
sed -i 's\#!/usr/bin/env RUBY_THREAD_VM_STACK_SIZE=5000000\#!/usr/bin/env\' bin/cddl
'';
};
});
exes = [ "cddl" ];
nativeBuildInputs = [ makeBinaryWrapper ];
postBuild = ''
wrapProgram $out/bin/cddl \
--set RUBY_THREAD_VM_STACK_SIZE 5000000
'';
passthru.updateScript = bundlerUpdateScript "cddl";
meta = with lib; {
description = "A parser, generator, and validator for CDDL";
homepage = "https://rubygems.org/gems/cddl";
license = with licenses; mit;
maintainers = with maintainers; [ fdns nicknovitski amesgen ];
platforms = platforms.unix;
};
}