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";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
2021-03-21 18:05:11 +00:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2022-04-26 08:48:39 +00:00
|
|
|
inherit (pkgs) stdenv;
|
2021-09-25 03:12:56 +00:00
|
|
|
drvArgs = { srcDir = self; };
|
2021-03-21 18:05:11 +00:00
|
|
|
in
|
|
|
|
rec {
|
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-01-07 20:06:12 +00:00
|
|
|
checks =
|
|
|
|
let
|
2022-01-08 22:02:04 +00:00
|
|
|
mkVariant = nix: (packages.nix-eval-jobs.override {
|
2022-04-18 12:45:49 +00:00
|
|
|
# TODO: fix to stable after next nix release
|
2022-04-24 02:07:25 +00:00
|
|
|
nix = pkgs.nix;
|
2022-04-18 12:45:49 +00:00
|
|
|
#inherit nix;
|
2022-01-08 22:02:04 +00:00
|
|
|
}).overrideAttrs (_: {
|
2022-01-07 20:06:12 +00:00
|
|
|
name = "nix-eval-jobs-${nix.version}";
|
|
|
|
inherit (nix) version;
|
|
|
|
});
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
2022-04-26 08:48:39 +00:00
|
|
|
treefmt = stdenv.mkDerivation {
|
|
|
|
name = "treefmt-check";
|
|
|
|
src = self;
|
|
|
|
nativeBuildInputs = devShells.default.nativeBuildInputs;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
env HOME=$(mktemp -d) treefmt --fail-on-change
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = "touch $out";
|
|
|
|
};
|
2022-01-07 20:06:12 +00:00
|
|
|
|
2022-04-24 02:07:25 +00:00
|
|
|
build = mkVariant pkgs.nix;
|
2022-01-07 20:06:12 +00:00
|
|
|
build-unstable = mkVariant pkgs.nixUnstable;
|
|
|
|
};
|
2021-08-25 17:50:06 +00:00
|
|
|
|
2021-08-24 18:13:04 +00:00
|
|
|
defaultPackage = self.packages.${system}.nix-eval-jobs;
|
2021-09-25 03:12:56 +00:00
|
|
|
devShell = pkgs.callPackage ./shell.nix drvArgs;
|
2021-08-25 17:50:06 +00:00
|
|
|
|
2021-09-25 03:17:06 +00:00
|
|
|
}
|
|
|
|
);
|
2020-11-29 14:33:55 +00:00
|
|
|
}
|