Skip to content

Regression of revisionWithDefault from lib/trivial.nix #202244

@etu

Description

@etu

Steps To Reproduce

Steps to reproduce the behavior:

  1. Cloning my repository: https://github.com/etu/nixconfig
  2. Update the submodule nix/nixos-unstable to latest nixos-unstable (in this case to: af50806, it worked fine on 013fcdd which is currently locked in the repository.)
  3. Eval my system: nix-build ./nix/nixos-unstable/nixos/ -I nixos-config=./hosts/private-laptop/configuration.nix -A system --dry-run

Build log

error: a string that refers to a store path cannot be appended to a path, at /etc/nixos/nix/nixos-unstable/lib/sources.nix:193:30

Additional context

This seems to be an additional regression from #199812, if I apply the following patch the build works:

-      revisionFile = ./.. + "/.git-revision";
-      gitRepo      = ./.. + "/.git";
+      revisionFile = "${toString ./..}/.git-revision";
+      gitRepo      = "${toString ./..}/.git";

Furter testing:

I have tried to install the following nix derivations as nix package:

  • nix_2_3
  • nix_2_6
  • nix

Along with the correct nix daemon version in my CI builds, however none of them have managed to actually build my configuration. So to me it looks like there's not a single version of nix that can actually use nixos-unstable at the moment. Maybe it works or maybe it doesn't if one enables experimental flags? I don't know. I don't plan to do that.

Notify maintainers

cc @Artturin @roberth

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.78, NixOS, 22.11 (Raccoon), 22.11.git.013fcdd1068`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - nixpkgs: `/etc/nixos/nix/nixos-unstable`

I have also tried to pull in a newer version of nix using nix-shell just to use a newer version of nix for nix-build (this however doesn't affect the nix daemon version running) and I still see the same issue:

 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.78, NixOS, 22.11 (Raccoon), 22.11.git.013fcdd1068`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - nixpkgs: `/etc/nixos/nix/nixos-unstable`

Metadata

Metadata

Assignees

Labels

0.kind: build failureA package fails to build1.severity: blockerThis is preventing another PR or issue from being completed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions