Skip to content

Commit de7eaae

Browse files
authored
fix: revert to build packages manually in flake check (#418)
* fix: revert to build packages manually in flake check so buildbot can build them * fix: pin down wake platforms * fix: update flake.lock with fixes to mkdocs plugins platforms * fix: improve mkdocs.nix
1 parent 45b8a8d commit de7eaae

File tree

6 files changed

+77
-60
lines changed

6 files changed

+77
-60
lines changed

flake.lock

Lines changed: 6 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
inputs.lib-extras.follows = "lib-extras";
1919
inputs.nixpkgs.follows = "nixpkgs-unstable";
2020
inputs.treefmt-nix.follows = "treefmt-nix";
21+
inputs.devour-flake.follows = "devour-flake";
2122
};
2223

2324
foundry-nix = {
@@ -91,6 +92,7 @@
9192
pkgs,
9293
pkgsUnstable,
9394
system,
95+
self',
9496
...
9597
}: {
9698
# pkgs
@@ -169,25 +171,26 @@
169171
};
170172

171173
# checks
172-
checks = let
173-
devour-flake = pkgs.callPackage inputs.devour-flake {};
174-
in
174+
checks =
175175
{
176-
nix-build-all = pkgs.writeShellApplication {
177-
name = "nix-build-all";
178-
runtimeInputs = [
179-
pkgs.nix
180-
devour-flake
181-
];
182-
text = ''
183-
# Make sure that flake.lock is sync
184-
nix flake lock --no-update-lock-file
185-
186-
# Do a full nix build (all outputs)
187-
devour-flake . "$@"
188-
'';
189-
};
176+
# TODO: Restore this check whenever buildbot supports more specific checks
177+
# nix-build-all = pkgs.writeShellApplication {
178+
# name = "nix-build-all";
179+
# runtimeInputs = [
180+
# pkgs.nix
181+
# devour-flake
182+
# ];
183+
# text = ''
184+
# # Make sure that flake.lock is sync
185+
# nix flake lock --no-update-lock-file
186+
#
187+
# # Do a full nix build (all outputs)
188+
# devour-flake . "$@"
189+
# '';
190+
# };
190191
}
192+
# merge in the package derivations to force a build of all packages during a `nix flake check`
193+
// (with lib; mapAttrs' (n: nameValuePair "package-${n}") (filterAttrs (n: _: ! builtins.elem n ["docs"]) self'.packages))
191194
# mix in tests
192195
// config.testing.checks;
193196
};

mkdocs.nix

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,29 @@
66
...
77
}: let
88
inherit (pkgs) stdenv runCommand;
9-
10-
mkdocs-custom =
11-
runCommand "mkdocs-custom" {
12-
buildInputs = [
13-
pkgs.python311
14-
pkgs.python311Packages.mkdocs
15-
pkgs.python311Packages.mkdocs-material
16-
inputs.mynixpkgs.packages.${system}.mkdocs-plugins
17-
];
18-
19-
meta.mainProgram = "mkdocs";
20-
} ''
21-
mkdir -p $out/bin
22-
23-
cat <<MKDOCS > $out/bin/mkdocs
24-
#!${pkgs.runtimeShell}
25-
set -euo pipefail
26-
export PYTHONPATH=$PYTHONPATH
27-
exec ${pkgs.python311Packages.mkdocs}/bin/mkdocs "\$@"
28-
MKDOCS
29-
30-
chmod +x $out/bin/mkdocs
31-
'';
329
in {
3310
packages.docs = let
11+
mkdocs-custom =
12+
pkgs.runCommand "mkdocs-custom" {
13+
buildInputs = [
14+
pkgs.python311
15+
pkgs.python311Packages.mkdocs
16+
pkgs.python311Packages.mkdocs-material
17+
inputs.mynixpkgs.packages.${system}.mkdocs-plugins
18+
];
19+
meta.mainProgram = "mkdocs";
20+
} ''
21+
mkdir -p $out/bin
22+
23+
cat <<MKDOCS > $out/bin/mkdocs
24+
#!${pkgs.runtimeShell}
25+
set -euo pipefail
26+
export PYTHONPATH=$PYTHONPATH
27+
exec ${pkgs.python311Packages.mkdocs}/bin/mkdocs "\$@"
28+
MKDOCS
29+
30+
chmod +x $out/bin/mkdocs
31+
'';
3432
docsPath = "./docs/nixos/modules";
3533
nixosMarkdownDocs = runCommand "nixos-options" {} ''
3634
mkdir $out
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
stdenv,
3+
fetchFromGitHub,
4+
fetchYarnDeps,
5+
nodePackages,
6+
}: let
7+
name = "lodestar";
8+
version = "1.12.0";
9+
10+
src = fetchFromGitHub {
11+
owner = "ChainSafe";
12+
repo = "lodestar";
13+
ref = "refs/tags/v${version}";
14+
hash = "";
15+
};
16+
17+
yarnDeps = stdenv.mkDerivation {
18+
yarnLock = "${src}/yarn.lock";
19+
hash = "";
20+
21+
};
22+
in yarnDeps
23+
# in stdenv.mkDerivation {
24+
# inherit name version src;
25+
# }

packages/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
prysm = callPackage ./clients/consensus/prysm {inherit bls blst;};
2121
teku = callPackage ./clients/consensus/teku {};
2222
nimbus = callPackageUnstable ./clients/consensus/nimbus {};
23+
lodestar = callPackage ./clients/consensus/lodestar {};
2324

2425
# Execution Clients
2526
erigon = callPackage ./clients/execution/erigon {};

packages/solidity/frameworks/wake/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ poetry2nix.mkPoetryApplication {
6666
changelog = "https://github.com/Ackee-Blockchain/wake/releases/tag/v${version}";
6767
mainProgram = "woke";
6868
license = licenses.mit;
69+
platforms = [
70+
"x86_64-linux"
71+
"aarch64-linux"
72+
];
6973
maintainers = with maintainers; [aldoborrero];
7074
};
7175
}

0 commit comments

Comments
 (0)