Packaging/Ruby: Difference between revisions

Klinger (talk | contribs)
F0x (talk | contribs)
Add example for setting gemConfig for bundlerEnv, extending from defaultGemConfig.
 
(2 intermediate revisions by 2 users not shown)
Line 36: Line 36:
<syntaxHighlight lang=console>
<syntaxHighlight lang=console>
$ nix-shell
$ nix-shell
$ bundle install     # generates Gemfile.lock
$ bundle lock     # generates Gemfile.lock
$ bundix              # generates gemset.nix
$ bundix              # generates gemset.nix
</syntaxHighlight>
</syntaxHighlight>
Line 92: Line 92:
}
}
</syntaxHighlight>
</syntaxHighlight>
=== Override gemConfig locally ===
<syntaxhighlight lang="nix">
gems = bundlerEnv {
    name = "beef-env";
    inherit ruby;
    gemdir  = ./.;
    gemConfig = pkgs.defaultGemConfig // {
        do_sqlite3 = attrs: {
            buildInputs = [ sqlite ];
        };
    };
};
</syntaxhighlight>




Line 115: Line 128:
   };
   };
</syntaxHighlight>
</syntaxHighlight>
=== set the local gemConfig ===
'''TODO''': also merge with the <code>defaultGemConfig</code> somehow


== Using Bundler 2 ==
== Using Bundler 2 ==
Line 125: Line 135:


[[Category:Development]]
[[Category:Development]]
[[Category:Languages]]
[[Category:Ruby]]