42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
|
lix.url = "git+https://git.lix.systems/lix-project/lix";
|
|
lix-module = {
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.lix.follows = "lix";
|
|
};
|
|
};
|
|
|
|
outputs = { nixpkgs, lix-module, ... }:
|
|
let
|
|
systems = [ "x86_64-linux" ];
|
|
nixpkgsFor = builtins.listToAttrs
|
|
(map
|
|
(system: {
|
|
name = system;
|
|
value = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ lix-module.overlays.default ];
|
|
};
|
|
})
|
|
systems);
|
|
forEachSystem = f: builtins.mapAttrs f nixpkgsFor;
|
|
in
|
|
{
|
|
packages = forEachSystem (system: pkgs: {
|
|
default = pkgs.writeShellApplication {
|
|
name = "calculate-buildkite-steps";
|
|
runtimeInputs = [
|
|
pkgs.nix-eval-jobs
|
|
pkgs.python3
|
|
];
|
|
text = ''
|
|
python ${./calculate-buildkite-steps.py} | buildkite-agent pipeline upload
|
|
'';
|
|
};
|
|
});
|
|
};
|
|
}
|