{ lib, buildGoModule, fetchFromGitHub, versionCheckHook, nix-update-script, }: buildGoModule (finalAttrs: { pname = "bark-server"; version = "2.2.8"; src = fetchFromGitHub { owner = "Finb"; repo = "bark-server"; tag = "v${finalAttrs.version}"; hash = "sha256-O4Bo3OuC8uwgFpwAY/zwSUQW6EY7h90Dn3tUjZA3j4E="; # populate values that require us to use git. By doing this in postFetch we # can delete .git afterwards and maintain better reproducibility of the src. leaveDotGit = true; postFetch = '' cd "$out" git rev-parse HEAD > $out/COMMIT # '0000-00-00T00:00:00Z' date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%dT%H:%M:%SZ" > $out/SOURCE_DATE_EPOCH find "$out" -name .git -print0 | xargs -0 rm -rf ''; }; vendorHash = "sha256-/h3L4Ow2aBPkbH1hPXCEb9DKrzVEcaLh2+O9iZXkXN8="; ldflags = [ "-s" "-w" "-X main.version=${finalAttrs.version}" ]; preBuild = '' ldflags+=" -X \"main.buildDate=$(