diff options
Diffstat (limited to 'nixos/modules/installer/tools/nixos-rebuild.sh')
-rw-r--r-- | nixos/modules/installer/tools/nixos-rebuild.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh index 5ecdcdb3cdb52..80a4537375c4f 100644 --- a/nixos/modules/installer/tools/nixos-rebuild.sh +++ b/nixos/modules/installer/tools/nixos-rebuild.sh @@ -311,9 +311,10 @@ fi # nixos-version shows something useful). if [ -n "$canRun" ]; then if nixpkgs=$(nix-instantiate --find-file nixpkgs "${extraBuildFlags[@]}"); then - suffix=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-version-suffix "${extraBuildFlags[@]}" || true) - if [ -n "$suffix" ]; then - echo -n "$suffix" > "$nixpkgs/.version-suffix" || true + revision=$($SHELL $nixpkgs/nixos/modules/installer/tools/get-git-revision "${extraBuildFlags[@]}" || true) + if [ -n "$revision" ]; then + echo -n ".git.$revision" > "$nixpkgs/.version-suffix" || true + echo -n "$revision" > "$nixpkgs/.git-revision" || true fi fi fi |