2020-11-29 14:33:55 +00:00
|
|
|
{
|
|
|
|
description = "Hydra's builtin hydra-eval-jobs as a standalone";
|
|
|
|
|
2023-12-17 12:00:32 +00:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
2023-01-02 10:19:32 +00:00
|
|
|
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
inputs.flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
2023-07-21 01:23:16 +00:00
|
|
|
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
|
|
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
2023-11-03 23:48:38 +00:00
|
|
|
inputs.nix-github-actions.url = "github:nix-community/nix-github-actions";
|
|
|
|
inputs.nix-github-actions.inputs.nixpkgs.follows = "nixpkgs";
|
2024-05-09 11:11:03 +00:00
|
|
|
inputs.lix = {
|
2024-05-30 19:50:13 +00:00
|
|
|
url = "git+https://git@git.lix.systems/lix-project/lix";
|
2024-05-09 11:11:03 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-01-02 10:31:28 +00:00
|
|
|
|
2023-01-02 10:19:32 +00:00
|
|
|
outputs = inputs @ { flake-parts, ... }:
|
|
|
|
let
|
|
|
|
inherit (inputs.nixpkgs) lib;
|
|
|
|
inherit (inputs) self;
|
|
|
|
in
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; }
|
2022-05-09 07:20:56 +00:00
|
|
|
{
|
2023-01-02 10:19:32 +00:00
|
|
|
systems = inputs.nixpkgs.lib.systems.flakeExposed;
|
2023-07-21 01:23:16 +00:00
|
|
|
imports = [ inputs.treefmt-nix.flakeModule ];
|
2023-11-03 23:48:38 +00:00
|
|
|
|
|
|
|
flake.githubActions = inputs.nix-github-actions.lib.mkGithubMatrix {
|
|
|
|
checks = {
|
|
|
|
inherit (self.checks) x86_64-linux;
|
|
|
|
x86_64-darwin = builtins.removeAttrs self.checks.x86_64-darwin [ "treefmt" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-09 11:11:03 +00:00
|
|
|
perSystem = { pkgs, self', inputs', ... }:
|
2023-01-02 10:19:32 +00:00
|
|
|
let
|
|
|
|
drvArgs = {
|
|
|
|
srcDir = self;
|
2024-05-09 11:11:03 +00:00
|
|
|
nix = inputs'.lix.packages.default;
|
2023-01-02 10:19:32 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2023-07-21 01:23:16 +00:00
|
|
|
treefmt.imports = [ ./dev/treefmt.nix ];
|
2023-01-02 10:19:32 +00:00
|
|
|
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs;
|
2023-07-13 09:45:06 +00:00
|
|
|
packages.clangStdenv-nix-eval-jobs = pkgs.callPackage ./default.nix (drvArgs // { stdenv = pkgs.clangStdenv; });
|
2023-01-02 10:19:32 +00:00
|
|
|
packages.default = self'.packages.nix-eval-jobs;
|
|
|
|
devShells.default = pkgs.callPackage ./shell.nix drvArgs;
|
2023-11-03 23:48:38 +00:00
|
|
|
|
|
|
|
checks = builtins.removeAttrs self'.packages [ "default" ] // {
|
|
|
|
shell = self'.devShells.default;
|
|
|
|
};
|
2023-01-02 10:19:32 +00:00
|
|
|
};
|
|
|
|
};
|
2020-11-29 14:33:55 +00:00
|
|
|
}
|