1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 02:43:24 +03:00
mobile-nixos/overlay/mruby-builder/overlay.nix
Samuel Dionne-Riel cc591aef6d mruby: Review how mruby.builder is made
Using `.override` inside the builder leads to `.override` outside being
ignored, as the `mruby` used would be whatever was last given to the
passthru `builder`'s own overrides or callPackages.

This breaks current calls to `mruby.builder` when `gems` was given.
Though since it breaks noisily, it won't silently ignore your gems.
2021-02-20 17:23:01 -05:00

19 lines
585 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 {
builder = final.callPackage ./mruby/builder.nix {
inherit static;
};
};
}