2020-11-29 14:33:55 +00:00
|
|
|
{
|
|
|
|
description = "Hydra's builtin hydra-eval-jobs as a standalone";
|
|
|
|
|
2022-04-18 12:31:47 +00:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2020-11-29 14:33:55 +00:00
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
|
2022-05-09 07:20:56 +00:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixpkgs
|
|
|
|
, flake-utils
|
|
|
|
}:
|
|
|
|
flake-utils.lib.eachDefaultSystem (
|
|
|
|
system:
|
2021-03-21 18:05:11 +00:00
|
|
|
let
|
2022-05-09 07:20:56 +00:00
|
|
|
nixVersion = nixpkgs.lib.fileContents ./.nix-version;
|
2021-03-21 18:05:11 +00:00
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2022-04-26 08:48:39 +00:00
|
|
|
inherit (pkgs) stdenv;
|
2022-05-09 07:20:56 +00:00
|
|
|
devShell = self.devShells.${system}.default;
|
|
|
|
drvArgs = {
|
|
|
|
srcDir = self;
|
|
|
|
nix = if nixVersion == "unstable" then pkgs.nixUnstable else pkgs.nixVersions."nix_${nixVersion}";
|
|
|
|
};
|
2021-03-21 18:05:11 +00:00
|
|
|
in
|
2022-05-09 07:20:56 +00:00
|
|
|
{
|
2021-09-25 03:12:56 +00:00
|
|
|
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs;
|
2021-08-25 17:50:06 +00:00
|
|
|
|
2022-05-09 07:20:56 +00:00
|
|
|
checks.treefmt = stdenv.mkDerivation {
|
|
|
|
name = "treefmt-check";
|
|
|
|
src = self;
|
|
|
|
nativeBuildInputs = devShell.nativeBuildInputs;
|
|
|
|
dontConfigure = true;
|
2022-01-07 20:06:12 +00:00
|
|
|
|
2022-05-09 07:20:56 +00:00
|
|
|
inherit (devShell) NODE_PATH;
|
2022-04-26 09:34:51 +00:00
|
|
|
|
2022-05-09 07:20:56 +00:00
|
|
|
buildPhase = ''
|
|
|
|
env HOME=$(mktemp -d) treefmt --fail-on-change
|
|
|
|
'';
|
2022-04-26 09:34:51 +00:00
|
|
|
|
2022-05-09 07:20:56 +00:00
|
|
|
installPhase = "touch $out";
|
|
|
|
};
|
2021-08-25 17:50:06 +00:00
|
|
|
|
2022-04-26 09:03:08 +00:00
|
|
|
packages.default = self.packages.${system}.nix-eval-jobs;
|
|
|
|
devShells.default = pkgs.callPackage ./shell.nix drvArgs;
|
2021-09-25 03:17:06 +00:00
|
|
|
}
|
|
|
|
);
|
2020-11-29 14:33:55 +00:00
|
|
|
}
|