nte/flake.nix

45 lines
1,019 B
Nix
Raw Normal View History

2024-05-22 21:19:37 +02:00
{
description = "Nix Template Engine";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-05-22 21:19:37 +02:00
};
outputs = {nixpkgs, ...}: let
systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages;
2024-09-12 21:48:26 +02:00
enginesForEach = import ./engine.nix;
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;
in {
inherit engine;
2024-09-12 21:45:32 +02:00
mkNteDerivation = import ./nte-drv.nix pkgs engine;
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-05-22 21:55:06 +02:00
in {
default = import ./example/default.nix {
inherit (pkgs) lib stdenv;
2024-09-12 21:48:26 +02:00
nte = engine ./example;
2024-05-22 21:55:06 +02:00
};
}
);
2024-05-22 21:19:37 +02:00
};
}