nix-eval-jobs/flake.nix

59 lines
1.7 KiB
Nix
Raw Normal View History

2020-11-29 14:33:55 +00:00
{
description = "Hydra's builtin hydra-eval-jobs as a standalone";
2022-03-13 16:16:53 +00:00
# switch back when https://github.com/NixOS/nixpkgs/pull/164012 is merged
#inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:Mic92/nixpkgs/nix-unstable";
2020-11-29 14:33:55 +00:00
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
drvArgs = { srcDir = self; };
in
rec {
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs;
2021-08-25 17:50:06 +00:00
checks =
let
mkVariant = nix: (packages.nix-eval-jobs.override {
inherit nix;
}).overrideAttrs (_: {
name = "nix-eval-jobs-${nix.version}";
inherit (nix) version;
});
in
{
editorconfig = pkgs.runCommand "editorconfig-check"
{
nativeBuildInputs = [
pkgs.editorconfig-checker
];
} ''
editorconfig-checker ${self}
touch $out
'';
nixpkgs-fmt = pkgs.runCommand "fmt-check"
{
nativeBuildInputs = [
pkgs.nixpkgs-fmt
];
} ''
nixpkgs-fmt --check .
touch $out
'';
build = mkVariant pkgs.nix;
build-unstable = mkVariant pkgs.nixUnstable;
};
2021-08-25 17:50:06 +00:00
defaultPackage = self.packages.${system}.nix-eval-jobs;
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
}