summaryrefslogtreecommitdiff
path: root/release.nix
blob: 7f85bf6ce2c1d579725f63db5cbf44bddd797a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#──────────────────────────────────────────────────────────────────────────────┐
# SPDX-FileCopyrightText: 2025 toastal <https://toast.al/contact/>             │
# SPDX-License-Identifier: LGPL-2.1-or-later                                   │
#──────────────────────────────────────────────────────────────────────────────┘
let
   inputs = import ./nix/tamal { };

   pkgs = import inputs.nixpkgs {
      overlays = [
         (import (inputs.dash-nix.outPath + "/nix/overlay"))
         (import ./nix/overlay/default.nix)
         (import ./nix/overlay/development.nix)
         (import ./nix/overlay/check.nix)
      ];
   };

   inherit (pkgs) lib;
in
{
   inherit (pkgs) nixtamal;

   inherit (pkgs.nixtamal) default;

   shell = pkgs.nixtamal.dev-shell;

   check = lib.concatMapAttrs (
      parent: children:
      if lib.isDerivation children then
         { ${parent} = children; }
      else
         lib.mapAttrs' (child: value: {
            name = "${parent}_${child}";
            inherit value;
         }) children
   ) pkgs.nixtamal.check;
}