Skip to content

Restore detailed Nix CLI version#12498

Merged
Ericson2314 merged 3 commits intomasterfrom
fix-cli-fine-version
Feb 18, 2025
Merged

Restore detailed Nix CLI version#12498
Ericson2314 merged 3 commits intomasterfrom
fix-cli-fine-version

Conversation

@roberth
Copy link
Member

@roberth roberth commented Feb 18, 2025

... as intended.

Requirements:

  • don't build fresh libraries for each git commit
  • have git commit in the CLI

Bug:

  • echo ${version} went into the wrong file
    => use the fact that it's a symlink, not just for reading but also for writing.

Motivation

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

... as intended.

Requirements:
- don't build fresh libraries for each git commit
- have git commit in the CLI

Bug:
- echo ${version} went into the wrong file => use the fact that it's
  a symlink, not just for reading but also for writing.
@roberth roberth added build-problem Nix fails to compile or test; also improvements to build process backport 2.26-maintenance labels Feb 18, 2025
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Feb 18, 2025
# Symlink ./.version points there, but by default only workDir is writable.
''
chmod u+w ./.version
echo ${version} > ../../../.version
Copy link
Member Author

Choose a reason for hiding this comment

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

The bad target.

I'll apply this change to all components.

This way it's easier to get right. See previous commit.
@github-actions github-actions bot added with-tests Issues related to testing. PRs with tests have some priority fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Feb 18, 2025
@Ericson2314 Ericson2314 merged commit da51098 into master Feb 18, 2025
21 checks passed
@Ericson2314 Ericson2314 deleted the fix-cli-fine-version branch February 18, 2025 16:34
mergify bot added a commit that referenced this pull request Feb 19, 2025
…2498

Restore detailed Nix CLI version (backport #12498)

setVersionLayer = finalAttrs: prevAttrs: {
preConfigure =
prevAttrs.prevAttrs or ""
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this should be prevAttrs.preConfigure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, opened #12600, thanks!

roberth added a commit to roberth/nix that referenced this pull request Mar 4, 2025
Apparently dead code in our use case, but good to keep nonetheless.
Credit: ztzg in NixOS#12498 (review)
mergify bot pushed a commit that referenced this pull request Mar 4, 2025
Apparently dead code in our use case, but good to keep nonetheless.
Credit: ztzg in #12498 (review)

(cherry picked from commit dcaea8c)
mergify bot pushed a commit that referenced this pull request Mar 4, 2025
Apparently dead code in our use case, but good to keep nonetheless.
Credit: ztzg in #12498 (review)

(cherry picked from commit dcaea8c)
L-as pushed a commit to L-as/nix that referenced this pull request Mar 11, 2025
Apparently dead code in our use case, but good to keep nonetheless.
Credit: ztzg in NixOS#12498 (review)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-problem Nix fails to compile or test; also improvements to build process c api Nix as a C library with a stable interface fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants