Merge pull request #104494 from sternenseemann/chroma-0.8.2

chroma: 0.8.1 -> 0.8.2
This commit is contained in:
Sandro 2020-12-22 17:29:02 +01:00 committed by GitHub
commit fe458a9dfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,16 +1,32 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, git }:
buildGoModule rec {
pname = "chroma";
version = "0.8.1";
version = "0.8.2";
src = fetchFromGitHub {
owner = "alecthomas";
repo = "chroma";
repo = pname;
rev = "v${version}";
sha256 = "1gwwfn26aipzzvyy466gi6r54ypfy3ylnbi8c4xwch9pkgw16w98";
sha256 = "0vzxd0jvjaakwjvkkkjppakjb00z44k7gb5ng1i4924agh24n5ka";
leaveDotGit = true;
fetchSubmodules = true;
};
nativeBuildInputs = [ git ];
# populate values otherwise taken care of by goreleaser
# https://github.com/alecthomas/chroma/issues/435
postPatch = ''
commit="$(git rev-parse HEAD)"
date=$(git show -s --format=%aI "$commit")
substituteInPlace cmd/chroma/main.go \
--replace 'version = "?"' 'version = "${version}"' \
--replace 'commit = "?"' "commit = \"$commit\"" \
--replace 'date = "?"' "date = \"$date\""
'';
vendorSha256 = "16cnc4scgkx8jan81ymha2q1kidm6hzsnip5mmgbxpqcc2h7hv9m";
subPackages = [ "cmd/chroma" ];