mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
gauge: add fromManifest helper function
This commit is contained in:
parent
2303a0b69d
commit
802b618473
@ -45,7 +45,15 @@ stdenvNoCC.mkDerivation {
|
||||
|
||||
nativeBuildInputs = [ gauge-unwrapped makeWrapper xorg.lndir ];
|
||||
|
||||
passthru.withPlugins = f: gauge.override { plugins = f gaugePlugins; };
|
||||
passthru = {
|
||||
withPlugins = f: gauge.override { plugins = f gaugePlugins; };
|
||||
fromManifest = path:
|
||||
let
|
||||
manifest = lib.importJSON path;
|
||||
requiredPlugins = with manifest; [ Language ] ++ Plugins;
|
||||
manifestPlugins = plugins: map (name: plugins.${name} or (throw "Gauge plugin ${name} is not available!")) requiredPlugins;
|
||||
in gauge.withPlugins manifestPlugins;
|
||||
};
|
||||
|
||||
inherit (gauge-unwrapped) meta;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user