nte/flake.nix

42 lines
948 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-05-22 21:55:06 +02:00
in rec {
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:45:32 +02:00
in rec {
2024-09-12 20:19:59 +02:00
engine = import ./engine.nix pkgs;
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};
in {
default = import ./example/default.nix {
inherit (pkgs) lib stdenv;
2024-09-12 20:19:59 +02:00
nte = functions.${system}.engine ./example;
2024-05-22 21:55:06 +02:00
};
}
);
2024-05-22 21:19:37 +02:00
};
}