Skip to content

Conversation

@emilylange
Copy link
Member

As requested in NixOS/infra#797, follow up to #76.

I manually tested the relevant bits of mirror-nixos-branch.pl by patching various variables, conditionals and some help of print and die.

The change to the redirect URL of nixexprs.tar.xz was tested with the help of a local reverse proxy.

PS: I do not like Perl

This is both very useful when viewing the summary html page on
releases.nixos.org (via channels.nixos.org) and also makes it so when
using the nixexprs.tar.xz as flake input, the flake metadata shows the
same date as the equivalent github:NixOS/nixpkgs would yield, instead of
relying on whatever the newest lastMod of any file in the tarball is.
Copy link
Member

@mweinelt mweinelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks great!

@mweinelt mweinelt added this pull request to the merge queue Nov 13, 2025
Merged via the queue into NixOS:master with commit 607578b Nov 13, 2025
1 check passed
@emilylange emilylange deleted the lockable-tarball branch November 13, 2025 21:15
@vcunat
Copy link
Member

vcunat commented Nov 21, 2025

🤔 I don't really mind, but why print the commit hash again? I see it five times in there now:

Starting Update Channel nixos-unstable-small...
 $ git fetch origin 33dee0014543abf6ada764a776fa0f93fbbe325c >&2
From https://github.com/NixOS/nixpkgs
 * branch                      33dee0014543abf6ada764a776fa0f93fbbe325c -> FETCH_HEAD
Release information:
 - release is: nixos-25.11pre898967.33dee0014543 (build 314081203)
 - eval is: 1820330
 - prefix is: nixos/unstable-small/nixos-25.11pre898967.33dee0014543
 - Git commit is: 33dee0014543abf6ada764a776fa0f93fbbe325c
 - Git commit date is: 2025-11-20 12:10:37 UTC
previous release is https://releases.nixos.org/nixos/unstable-small/nixos-25.11pre898540.094318ea1650
downloading [...]

@emilylange
Copy link
Member Author

I felt like the git fetch output is worthwhile in situation when e.g. GitHub is having issues again.
But sure, we could add --quiet as argument to git fetch or discard the output by some other way.

This feedback is appreciated, thanks. And I am open to change this.

It's mostly that I have no idea how those logs are used besides some rare debugging sessions.
So I went with slightly more output than absolutely necessary in an attempt to every so slightly aid those debugging sessions.

PS: Also, just to avoid confusion for future readers seeing the diff of this PR here: The git fetch output is caused by the follow-up PR #101 and not this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants