2024-12-12 14:41:43 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Maurice Debray <maurice.debray@dgnum.eu>
|
|
|
|
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
2024-12-07 15:30:42 +01:00
|
|
|
{ sources, pkgs }:
|
2023-07-21 00:37:05 +02:00
|
|
|
|
|
|
|
let
|
2024-12-07 15:30:42 +01:00
|
|
|
# TODO: move this into a proper overlay of `pkgs` so that we don't need to track this for every and any package.
|
|
|
|
colmena = pkgs.callPackage ../lib/colmena {
|
|
|
|
colmena = pkgs.callPackage "${sources.colmena}/package.nix" { };
|
|
|
|
};
|
|
|
|
|
2024-11-14 22:18:40 +01:00
|
|
|
inherit (pkgs.lib) mapAttrs;
|
|
|
|
|
|
|
|
inherit (pkgs)
|
|
|
|
writeShellApplication
|
|
|
|
jq
|
|
|
|
nvd
|
|
|
|
;
|
2024-11-14 22:01:58 +01:00
|
|
|
|
|
|
|
scripts = {
|
2024-12-21 14:01:10 +01:00
|
|
|
cache-node = [
|
|
|
|
colmena
|
|
|
|
self.push-to-cache
|
|
|
|
];
|
|
|
|
push-to-cache = [ ];
|
|
|
|
nix-build-and-cache = [ self.push-to-cache ];
|
2024-11-14 22:01:58 +01:00
|
|
|
check-deployment = [
|
2023-07-21 00:37:05 +02:00
|
|
|
colmena
|
2024-02-02 10:51:31 +01:00
|
|
|
jq
|
2024-11-14 22:01:58 +01:00
|
|
|
nvd
|
|
|
|
];
|
|
|
|
launch-vm = [ colmena ];
|
|
|
|
list-nodes = [ jq ];
|
2023-07-21 00:37:05 +02:00
|
|
|
};
|
|
|
|
|
2024-12-21 14:01:10 +01:00
|
|
|
self = mapAttrs (
|
|
|
|
name: runtimeInputs:
|
|
|
|
writeShellApplication {
|
|
|
|
inherit name runtimeInputs;
|
2024-11-14 22:01:58 +01:00
|
|
|
|
2024-12-21 14:01:10 +01:00
|
|
|
text = builtins.readFile ./${name}.sh;
|
|
|
|
}
|
|
|
|
) scripts;
|
|
|
|
in
|
|
|
|
self
|