Add overall required job (#106)

* Update flake.nix

* Update flake.nix

* Update flake.nix

* Update flake.nix

* Fix nixutils back to numtide

* ???

* ???

* 🤦

* 🤯

* yuck!
This commit is contained in:
Moritz Angermann 2023-10-18 12:10:55 +08:00 committed by GitHub
parent b6ff21f7bb
commit cf203c4609
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 9 deletions

View File

@ -122,16 +122,15 @@
"systems": "systems"
},
"locked": {
"lastModified": 1681378341,
"narHash": "sha256-2qUN04W6X9cHHytEsJTM41CmusifPTC0bgTtYsHSNY8=",
"owner": "hamishmack",
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "2767bafdb189cd623354620c2dacbeca8fd58b17",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "hamishmack",
"ref": "hkm/nested-hydraJobs",
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}

View File

@ -3,7 +3,7 @@
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:hamishmack/flake-utils/hkm/nested-hydraJobs";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.iohk-nix.url = "github:input-output-hk/iohk-nix";
outputs = { self, nixpkgs, flake-utils, haskellNix, iohk-nix }:
@ -47,7 +47,7 @@
"aarch64-linux"
"aarch64-darwin"
];
in flake-utils.lib.eachSystem supportedSystems (system:
in let flake-outputs = flake-utils.lib.eachSystem supportedSystems (system:
let
pkgs = import nixpkgs {
overlays = [haskellNix.overlay] ++ builtins.attrValues overlays;
@ -165,7 +165,7 @@
inherit devShells;
hydraJobs = devShells // {
# *-dev sentinel job. Singals all -env have been built.
required = pkgs.runCommand "test-dependencies" {
required = pkgs.runCommand "required dependencies (${system})" {
_hydraAggregate = true;
constituents = map (name: "${system}.${name}-env") (builtins.attrNames devShellsWithEvalOnLinux);
} "touch $out";
@ -211,6 +211,15 @@
packages.cabalProjectLocal.cross-js = (import ./quirks.nix { pkgs = js-pkgs; }).template;
packages.cabalProjectLocal.cross-windows = (import ./quirks.nix { pkgs = windows-pkgs; }).template;
});
# we use flake-outputs here to inject a required job that aggregates all required jobs.
in flake-outputs // {
hydraJobs = flake-outputs.hydraJobs // {
required = (import nixpkgs { system = "x86_64-linux"; }).runCommand "required dependencies" {
_hydraAggregate = true;
constituents = map (s: "${s}.required") supportedSystems;
} "touch $out";
};
};
# --- Flake Local Nix Configuration ----------------------------
nixConfig = {