NixOS / NixOS/nix

Provide flake's current commit message in self.sourceInfo

Open
#13,331 1 comment 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
17.7k
Forks
2k
Avg merge
1d 19h
Merged PRs (30d)
76

Description

Is your feature request related to a problem?

It would be great if one could access the current commit message of the flake. The self.sourceInfo.*Rev are great, but for things like the boot menu or other version identifiers consumed by humans, a commit message would be much more readable.

Proposed solution

New self.sourceInfo string attributes:

  • commitTitle: first line of the current flake commit
  • commitMsg: full commit message, possibly multiple lines

If necessary, the same dirty* variants for dirty flake trees.

Alternative solutions

There are partial workarounds to this, that are rather impure and require external setup:

Additional context

Checklist


Add 👍 to issues you find important.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the latest Nix manual and the existing self.sourceInfo.*Rev attributes to understand how flake source metadata is exposed. Define the behavior of commitTitle and commitMsg, including whether dirty variants are required, then verify that the attributes provide the current commit information for human-readable identifiers.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.