2174bfe675
Previously this was done rather hackily using substituteInPlace in postFetch, however I've since found out that the way goreleaser does it is actually quite accessible, since it just calls go with the appropriate -X flags. To avoid having to call git in the build to obtain the values and to not rely on leaveDotGit, we can use the JSON populated by nix-prefetch-git which contains the extra information we need: the commit hash and the date.
12 lines
375 B
JSON
12 lines
375 B
JSON
{
|
|
"url": "https://github.com/alecthomas/chroma.git",
|
|
"rev": "6520148857c2ae3106ff371e527abea815b23915",
|
|
"date": "2021-10-17T08:46:20+11:00",
|
|
"path": "/nix/store/0s8a46d1nyjl3yhsgni2jz5vdv95cka8-chroma",
|
|
"sha256": "1iy6mymdjxbl5wbll1mivv7gqdyqhl6xpfqps99z307m7y38r1ni",
|
|
"fetchLFS": false,
|
|
"fetchSubmodules": false,
|
|
"deepClone": false,
|
|
"leaveDotGit": false
|
|
}
|