Skip to content

Commit

Permalink
nixos-asus: hydra: fix loading /build/<id> with ca-derivations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindavi committed Apr 3, 2024
1 parent 1a2b8ea commit 1bfccee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions machines/nixos-asus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,15 @@
# Let's just wait until nix_2_20 works in nixpkgs, that makes it a lot easier to update hydra.
package = (pkgs.hydra_unstable.overrideAttrs(oldAttrs: rec {
version = "unstable-2024-03-08_nix_2_20";
# patches = (oldAttrs.patches or []) ++ [
patches = (oldAttrs.patches or []) ++ [
# (pkgs.fetchpatch2 {
# url = "https://patch-diff.githubusercontent.com/raw/NixOS/hydra/pull/1354.patch";
# name = "nix_2_20_support.patch";
# hash = "sha256-AyluH3+9um83upYpjO6QsZ4Nv2Vv8Nlhj0c4IBhe0Gs=";
# revert = true;
# })
# ];
./patches/hydra-ca-outpaths-patch.diff
];
src = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
Expand Down
13 changes: 13 additions & 0 deletions machines/nixos-asus/patches/hydra-ca-outpaths-patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm
index 71a8a7d7..b6a9eb19 100644
--- a/src/lib/Hydra/Helper/Nix.pm
+++ b/src/lib/Hydra/Helper/Nix.pm
@@ -180,6 +180,8 @@ sub getDrvLogPath {
sub findLog {
my ($c, $drvPath, @outPaths) = @_;

+ @outPaths = grep {defined} @outPaths;
+
if (defined $drvPath) {
my $logPath = getDrvLogPath($drvPath);
return $logPath if defined $logPath;

0 comments on commit 1bfccee

Please sign in to comment.