()
| 56 | } |
| 57 | |
| 58 | func nixpkgsCommitFileContents() (map[string]string, error) { |
| 59 | path := nixpkgsCommitFilePath() |
| 60 | if !fileutil.Exists(path) { |
| 61 | return map[string]string{}, nil |
| 62 | } |
| 63 | |
| 64 | contents, err := os.ReadFile(path) |
| 65 | if err != nil { |
| 66 | return nil, errors.WithStack(err) |
| 67 | } |
| 68 | |
| 69 | commitToLocation := map[string]string{} |
| 70 | return commitToLocation, errors.WithStack(json.Unmarshal(contents, &commitToLocation)) |
| 71 | } |
| 72 | |
| 73 | func saveToNixpkgsCommitFile(commit string, commitToLocation map[string]string) error { |
| 74 | // Make a query to get the /nix/store path for this commit hash. |
no test coverage detected