From a026cc2224ec2cc7aa5d53c542521eb0cea1ad37 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 8 Nov 2023 14:00:41 -0500 Subject: [PATCH] Don't include the version number in the nix config, for reproducibility. Closes #580 (#710) --- src/action/base/create_or_merge_nix_config.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/action/base/create_or_merge_nix_config.rs b/src/action/base/create_or_merge_nix_config.rs index 250ac0be1..1f69ddb41 100644 --- a/src/action/base/create_or_merge_nix_config.rs +++ b/src/action/base/create_or_merge_nix_config.rs @@ -409,10 +409,13 @@ impl Action for CreateOrMergeNixConfig { new_config.push('\n'); } - new_config.push_str(&format!( - "# Generated by https://github.com/DeterminateSystems/nix-installer, version {version}.\n", - version = env!("CARGO_PKG_VERSION"), - )); + new_config.push_str( + &[ + "# Generated by https://github.com/DeterminateSystems/nix-installer.", + "# See `/nix/nix-installer --version` for the version details.", + ] + .join("\n"), + ); for (name, value) in merged_nix_config.settings() { new_config.push_str(name);