Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/src/plugins/scriptedwizard/wiz.cpp b/src/plugins/scriptedwizard/wiz.cpp 2index 0eb4b27..7d469fe 100644 3--- a/src/plugins/scriptedwizard/wiz.cpp 4+++ b/src/plugins/scriptedwizard/wiz.cpp 5@@ -785,6 +785,13 @@ void Wiz::CopyFiles(cbProject* theproject, const wxString& prjdir, const wxStri 6 } 7 } 8 if (do_copy) wxCopyFile(srcfile, dstfile, true); 9+ // Noticed! Files in Nix Store are readonly, so make the copied file writable 10+ if (do_copy) 11+ { 12+ struct stat statbuf; 13+ if (!::stat(dstfile.mb_str(), &statbuf)) 14+ ::chmod(dstfile.mb_str(), statbuf.st_mode | 0200); 15+ } 16 17 // and add it to the project 18 fname.MakeRelativeTo(prjdir);