feat: provide wrapped packages

This commit is contained in:
Kat Inskip 2024-10-25 13:35:27 -04:00
parent fb9e62db99
commit 845afbeaf5
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
12 changed files with 77 additions and 29 deletions

20
wrappers/nf-generate.nix Normal file
View file

@ -0,0 +1,20 @@
{
system,
inputs,
...
}@args: let
lib = inputs.nixpkgs.lib;
exportFile = import ./exports.nix args;
inherit (exportFile) exports exportsSystems;
inherit (lib.strings) makeBinPath;
inherit (inputs.std.lib) string list set;
packages = inputs.self.packages.${system};
inherit (inputs.self.legacyPackages.${system}) pkgs;
nf-generate = pkgs.writeShellScriptBin "nf-generate" ''
${exports}
export PATH="$PATH:${makeBinPath [pkgs.jq]}"
NF_INPUT_CI=${string.escapeShellArg inputs.ci}
NF_CONFIG_FILES=(${string.concatMapSep " " string.escapeShellArg ci.workflowConfigs})
source ${../ci/generate.sh}
'';
in nf-generate