Skip to content

Commit

Permalink
feat: add hydra spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristano8 committed Mar 5, 2024
1 parent d71eebe commit 8de0208
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 12 deletions.
14 changes: 14 additions & 0 deletions .hydra/spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"wai-handler-hal-example": {
"enabled": 1,
"hidden": false,
"keepnr": 1,
"checkinterval": 300,
"schedulingshares": 100,
"description": "Development shell and bootstraps for wai-handler-hal-example repo",
"enableemail": false,
"emailoverride": "",
"type": 1,
"flake": "git+ssh://[email protected]/bellroy/wai-handler-hal-example"
}
}
38 changes: 26 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
}];
};

devShells.x86_64-linux.default =
(project pkgsLocal).shellFor {
withHoogle = false;
buildInputs = with pkgsLocal; [
haskellPackages.cabal-fmt
nixpkgs-fmt
nodejs
];
};

# Compress a binary and put it in a directory under the name
# `bootstrap`; CDK is smart enough to zip the directory up for
# deployment.
Expand All @@ -47,8 +57,7 @@
mkdir $out
${pkgsLocal.upx}/bin/upx -9 -o $out/bootstrap ${lambdaBinary}
'';
in
{

packages.x86_64-linux = {
default = bootstrap;
container = pkgsLocal.callPackage ./container.nix {
Expand All @@ -66,16 +75,21 @@
};
};

devShells.x86_64-linux.default =
(project pkgsLocal).shellFor {
withHoogle = false;
buildInputs = with pkgsLocal; [
haskellPackages.cabal-fmt
nixpkgs-fmt
nodejs
];
};
};
hydraJobs = {
aggregate = evalPkgs.runCommand "aggregate"
{
_hydraAggregate = true;
constituents = [
"devShells.x86_64-linux.default"
"packages.x86_64-linux.default"
"packages.x86_64-linux.container"
"packages.x86_64-linux.tiny-container"
];
}
"touch $out";
} // devShells // packages;
in
{ inherit devShells packages hydraJobs; };

nixConfig = {
allow-import-from-derivation = "true";
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8de0208

Please sign in to comment.