2024-05-22 21:19:37 +02:00
|
|
|
{
|
|
|
|
description = "Nix Template Engine";
|
|
|
|
|
|
|
|
inputs = {
|
2024-09-12 19:53:43 +02:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-09-12 22:10:08 +02:00
|
|
|
systems.url = "github:nix-systems/default";
|
2024-05-22 21:19:37 +02:00
|
|
|
};
|
|
|
|
|
2024-09-12 22:10:08 +02:00
|
|
|
outputs = { nixpkgs, systems, ... }: let
|
|
|
|
forEachSystem = nixpkgs.lib.genAttrs (import systems);
|
2024-05-22 21:19:37 +02:00
|
|
|
pkgsForEach = nixpkgs.legacyPackages;
|
2024-09-12 21:48:26 +02:00
|
|
|
enginesForEach = import ./engine.nix;
|
2024-09-12 23:09:29 +02:00
|
|
|
mkNteDerivationsForEach = import ./nte-drv.nix;
|
2024-09-12 21:48:26 +02:00
|
|
|
in {
|
2024-09-12 20:19:59 +02:00
|
|
|
functions = forEachSystem (
|
2024-05-22 21:19:37 +02:00
|
|
|
system: let
|
|
|
|
pkgs = pkgsForEach.${system};
|
2024-09-12 21:48:26 +02:00
|
|
|
engine = enginesForEach pkgs;
|
2024-09-12 23:09:29 +02:00
|
|
|
mkNteDerivation = mkNteDerivationsForEach pkgs engine;
|
2024-09-12 21:48:26 +02:00
|
|
|
in {
|
2024-09-12 23:09:29 +02:00
|
|
|
inherit engine mkNteDerivation;
|
2024-05-22 21:19:37 +02:00
|
|
|
}
|
|
|
|
);
|
2024-05-22 21:55:06 +02:00
|
|
|
|
2024-07-17 19:17:29 +02:00
|
|
|
libs = forEachSystem (
|
|
|
|
system: let
|
|
|
|
pkgs = pkgsForEach.${system};
|
|
|
|
in {
|
|
|
|
default = import ./stdlib.nix pkgs;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2024-05-22 21:55:06 +02:00
|
|
|
examples = forEachSystem (
|
|
|
|
system: let
|
|
|
|
pkgs = pkgsForEach.${system};
|
2024-09-12 21:48:26 +02:00
|
|
|
engine = enginesForEach pkgs;
|
2024-09-12 23:09:29 +02:00
|
|
|
mkNteDerivation = mkNteDerivationsForEach pkgs engine;
|
2024-05-22 21:55:06 +02:00
|
|
|
in {
|
|
|
|
default = import ./example/default.nix {
|
2024-09-12 23:09:29 +02:00
|
|
|
inherit (pkgs) lib;
|
|
|
|
inherit mkNteDerivation;
|
2024-05-22 21:55:06 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
2024-05-22 21:19:37 +02:00
|
|
|
};
|
|
|
|
}
|