1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 11:03:37 +03:00
mobile-nixos/overlay/mruby-builder/overlay.nix
Samuel Dionne-Riel 6f8a8ee208 mruby-builder: Import mruby-builder
This overlay allows building bespoke binaries using mruby with a
custom-made builder.

This may evolve a bit with *actual* use.
2020-02-03 16:19:10 -05:00

21 lines
666 B
Nix

final: super:
let
# Errr... nothing in the `makeStatic*` stdenv adapters allow detecting
# whether we're doing a static build or not in a sane manner.
# Let's co-opt the `dontDisableStatic` attribute it overrides into a
# derivation, let's say, hello...
static = if final.hello ? dontDisableStatic then final.hello.dontDisableStatic else false;
in
{
hello-mruby = final.callPackage ./hello-mruby {};
mrbgems = final.callPackage ./mrbgems {};
mruby = (final.callPackage ./mruby {}).overrideAttrs({passthru ? {}, ...}: {
passthru = passthru // {
builder = final.callPackage ./mruby/builder.nix {
inherit static;
};
};
});
}