2024-07-06 23:26:21 +03:00
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pins = import ../sources;
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
perSystem = { config, ... }: {
|
|
|
|
catalog.depot = {
|
|
|
|
packages = lib.mapAttrs (name: package: {
|
2024-07-23 03:48:30 +03:00
|
|
|
description = "Package: ${name}";
|
2024-07-06 23:26:21 +03:00
|
|
|
actions = lib.mkMerge [
|
|
|
|
{
|
|
|
|
build = {
|
|
|
|
description = "Build this package.";
|
|
|
|
command = "nix build -L '${builtins.unsafeDiscardStringContext package.drvPath}^*'";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
(lib.mkIf (pins ? ${name}) {
|
|
|
|
updatePin = {
|
|
|
|
description = "Update this package's source pin.";
|
|
|
|
command = "${lib.getExe config.packages.pin} update ${name}";
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}) config.packages;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|