Skip to content

Commit

Permalink
feat(back): fluidattacks#1223 support jobs
Browse files Browse the repository at this point in the history
- Add support for jobs in makes.nix
in order to deprecate main.nix and
CLI job discovery
- Remove unused scorecard pipeline
  • Loading branch information
dsalaza4 committed Dec 18, 2024
1 parent 4c03e5b commit 555b68c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 47 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/scorecards-analysis.yaml

This file was deleted.

9 changes: 8 additions & 1 deletion makes.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{ fetchNixpkgs, fetchUrl, outputs, projectPath, __nixpkgs__, ... }: {
{ fetchNixpkgs, fetchUrl, makeScript, outputs, projectPath, __nixpkgs__, ...
}: {
jobs = {
"test" = makeScript {
name = "test/job";
entrypoint = "echo Hello test";
};
};
projectIdentifier = "makes-repo";
cache = {
readNixos = true;
Expand Down
1 change: 1 addition & 0 deletions src/evaluator/modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
(import ./format-yaml/default.nix args)
(import ./hello-world/default.nix args)
(import ./inputs/default.nix)
(import ./jobs/default.nix args)
(import ./lint-bash/default.nix args)
(import ./lint-git-mailmap/default.nix args)
(import ./lint-nix/default.nix args)
Expand Down
16 changes: 16 additions & 0 deletions src/evaluator/modules/jobs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ __toModuleOutputs__, ... }:
{ config, lib, ... }:
let
makeOutput = name: value: {
inherit name;
inherit value;
};
in {
options = {
jobs = lib.mkOption {
default = { };
type = lib.types.attrsOf lib.types.package;
};
};
config = { outputs = __toModuleOutputs__ makeOutput config.jobs; };
}

0 comments on commit 555b68c

Please sign in to comment.