2022-11-25 00:13:47 +03:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
|
|
|
let
|
|
|
|
inherit (builtins) listToAttrs mapAttrs;
|
|
|
|
|
2023-03-15 00:10:13 +03:00
|
|
|
allPackageNames = [ "d2" "d2plugin-tala" "d2full" "fawltydeps" ];
|
2022-12-13 17:21:48 +03:00
|
|
|
mkAllPackages = pkgs':
|
|
|
|
let
|
|
|
|
d2-unwrapped = pkgs'.callPackage ./pkgs/d2/d2-unwrapped.nix { };
|
|
|
|
d2plugin-tala = pkgs'.callPackage ./pkgs/d2/d2plugin-tala.nix { };
|
|
|
|
d2 = pkgs'.callPackage ./pkgs/d2 {
|
|
|
|
inherit d2-unwrapped d2plugin-tala;
|
|
|
|
};
|
2023-03-15 00:10:13 +03:00
|
|
|
fawltydeps = pkgs'.callPackage ./pkgs/fawltydeps { };
|
2022-12-13 17:21:48 +03:00
|
|
|
in
|
|
|
|
{
|
2023-03-15 00:10:13 +03:00
|
|
|
inherit d2 d2plugin-tala fawltydeps;
|
2023-01-04 06:40:23 +03:00
|
|
|
d2-full = d2.override { withTala = true; };
|
2022-12-13 17:21:48 +03:00
|
|
|
};
|
|
|
|
|
2022-11-25 00:13:47 +03:00
|
|
|
mkApp = drv: flake-utils.lib.mkApp { inherit drv; };
|
|
|
|
mkOverlay = name:
|
|
|
|
final: prev:
|
2022-12-13 17:21:48 +03:00
|
|
|
final.filterAttrs (n: v: n == name) (mkAllPackages prev);
|
2022-11-25 00:13:47 +03:00
|
|
|
in
|
|
|
|
{
|
|
|
|
overlays = (listToAttrs
|
|
|
|
(map
|
|
|
|
(name: { inherit name; value = mkOverlay name; })
|
|
|
|
allPackageNames
|
|
|
|
)
|
|
|
|
) // {
|
|
|
|
all = final: prev: mkAllPackages prev;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs { inherit system; };
|
2022-12-13 17:21:48 +03:00
|
|
|
packages = mkAllPackages pkgs;
|
2022-11-25 00:13:47 +03:00
|
|
|
in
|
|
|
|
{
|
|
|
|
check = packages;
|
|
|
|
|
|
|
|
inherit packages;
|
|
|
|
apps = mapAttrs (name: mkApp) packages;
|
|
|
|
});
|
|
|
|
}
|