mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 03:12:51 +00:00
42 lines
954 B
Nix
42 lines
954 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 = "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;
|
|
};
|
|
}
|