Fil-C on Nix

Filnix wiki

mbrock/filnix

ports/rubyPorts-as-gemConfig.nix

λpkgs, final
let
3inherit pkgs
lib

Use final.defaultGemConfig to get Fil-C dependencies (like final.libffi)

6baseGemConfig=
final.defaultGemConfig
8portList=
import../rubyports.nix inherit pkgs final;
used by portSpecs
10portSpecs=
builtins.listToAttrs
lib.flatten
map
λitem
builtins.isStringitem
→
16name=
17value=
{ }
item ? pname
→
21name=
item.pname
22value=
else
lib.mapAttrsToList
λname spec
26inherit
name
27value=
33specToFn=
λspec
spec ≡ { }
→
_attrs: { }
spec ? attrs ∧ builtins.isFunctionspec.attrs
→
spec.attrs
else
_attrs: { }
used by ourFn
42composedGemConfig=
lib.mapAttrs
λname spec
let
45ourFn=
uses specToFn used by ourResult
in
in