File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- { lib , buildGoModule , fetchFromGitHub } :
1+ { lib , buildGoModule , fetchFromGitHub , git } :
22
33buildGoModule rec {
44 pname = "chroma" ;
5- version = "0.8.1 " ;
5+ version = "0.8.2 " ;
66
77 src = fetchFromGitHub {
88 owner = "alecthomas" ;
9- repo = "chroma" ;
9+ repo = pname ;
1010 rev = "v${ version } " ;
11- sha256 = "1gwwfn26aipzzvyy466gi6r54ypfy3ylnbi8c4xwch9pkgw16w98" ;
11+ sha256 = "0vzxd0jvjaakwjvkkkjppakjb00z44k7gb5ng1i4924agh24n5ka" ;
12+ leaveDotGit = true ;
13+ fetchSubmodules = true ;
1214 } ;
1315
16+ nativeBuildInputs = [ git ] ;
17+
18+ # populate values otherwise taken care of by goreleaser
19+ # https://github.com/alecthomas/chroma/issues/435
20+ postPatch = ''
21+ commit="$(git rev-parse HEAD)"
22+ date=$(git show -s --format=%aI "$commit")
23+
24+ substituteInPlace cmd/chroma/main.go \
25+ --replace 'version = "?"' 'version = "${ version } "' \
26+ --replace 'commit = "?"' "commit = \"$commit\"" \
27+ --replace 'date = "?"' "date = \"$date\""
28+ '' ;
29+
1430 vendorSha256 = "16cnc4scgkx8jan81ymha2q1kidm6hzsnip5mmgbxpqcc2h7hv9m" ;
1531
1632 subPackages = [ "cmd/chroma" ] ;
You can’t perform that action at this time.
0 commit comments