From: Scott Worley Date: Mon, 23 Aug 2021 20:17:45 +0000 (-0700) Subject: Help get-version-suffix find itself X-Git-Url: http://git.scottworley.com/warn-nixpkgs/commitdiff_plain/17ccb9d76a79ac691c1e598171af6ef7f7509a9c Help get-version-suffix find itself get-version-suffix assumes that nixpkgs is always installed at . This is not true when using a nixpkgs wrapper, such as this warn-nixpkgs. --- diff --git a/nixos/modules/installer/tools/get-version-suffix b/nixos/modules/installer/tools/get-version-suffix index fceb513..9b73e1e 100755 --- a/nixos/modules/installer/tools/get-version-suffix +++ b/nixos/modules/installer/tools/get-version-suffix @@ -1,5 +1,7 @@ #!/bin/sh -echo "warning: Using legacy channel get-version-suffix from `nix-instantiate --find-file nixpkgs-warned "$@"`/nixos/modules/installer/tools/get-version-suffix" >&2 +warn_nixpkgs_actual_nixpkgs_path="`nix-instantiate --find-file nixpkgs-warned "$@"`" -/bin/sh `nix-instantiate --find-file nixpkgs-warned "$@"`/nixos/modules/installer/tools/get-version-suffix "$@" +echo "warning: Using legacy channel get-version-suffix from $warn_nixpkgs_actual_nixpkgs_path/nixos/modules/installer/tools/get-version-suffix" >&2 + +/bin/sh "$warn_nixpkgs_actual_nixpkgs_path/nixos/modules/installer/tools/get-version-suffix" -I nixpkgs="$warn_nixpkgs_actual_nixpkgs_path" "$@"