diff --git a/flake.lock b/flake.lock index 9848cb996..0a5f76db7 100644 --- a/flake.lock +++ b/flake.lock @@ -6,4 +6,4 @@ } }, "version": 1 -} \ No newline at end of file +} diff --git a/src/libexpr/primops/flake.cc b/src/libexpr/primops/flake.cc index 5e732b362..1d409105f 100644 --- a/src/libexpr/primops/flake.cc +++ b/src/libexpr/primops/flake.cc @@ -121,7 +121,7 @@ void writeLockFile(const LockFile & lockFile, const Path & path) for (auto & x : lockFile.flakeEntries) json["requires"][x.first.to_string()] = flakeEntryToJson(x.second); createDirs(dirOf(path)); - writeFile(path, json.dump(4)); // '4' = indentation in json file + writeFile(path, json.dump(4) + "\n"); // '4' = indentation in json file } std::shared_ptr getGlobalRegistry()