Skip to content

Commit 45bbacc

Browse files
Ma27mweinelt
authored andcommitted
Only show stepname if it doesn't equal the name of the drv
When building e.g. nixpkgs, the "Running builds" view will mostly look like this hello.x86_64-linux (Build of hello-X.Y) exa.x86_64-linux (Build of exa-X.Y) ... This doesn't provide any useful information. Showing the step name only makes sense if it's not a child of the job's derivation. With this patch, that information will only be shown if the drv name (i.e. w/o `/nix/store/` prefix, .drv ext & hash) is not equal to the drv name of the job itself (build.nixname).
1 parent 5634c0d commit 45bbacc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/root/common.tt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ BLOCK renderDrvInfo;
9696
.substr(11) # strip `/nix/store/`
9797
.split('-').slice(1).join("-") # strip hash part
9898
.substr(0, -4); # strip `.drv`
99-
IF step.type == 0; action = "Build"; ELSE; action = "Substitution"; END;
100-
IF drvname; %]<em> ([% action %] of [% drvname %])</em>[% END;
99+
IF drvname != releasename;
100+
IF step.type == 0; action = "Build"; ELSE; action = "Substitution"; END;
101+
IF drvname; %]<em> ([% action %] of [% drvname %])</em>[% END;
102+
END;
101103
END;
102104

103105

@@ -143,7 +145,7 @@ BLOCK renderBuildListBody;
143145
<td>
144146
<a href="[%link%]">[% IF !hideJobsetName %][%build.jobset.get_column("project")%]:[%build.jobset.get_column("name")%]:[% END %][%build.get_column("job")%]</a>
145147
[% IF showStepName %]
146-
[% INCLUDE renderDrvInfo step=build.buildsteps %]
148+
[% INCLUDE renderDrvInfo step=build.buildsteps releasename=build.nixname %]
147149
[% END %]
148150
</td>
149151
[% END %]

0 commit comments

Comments
 (0)