{ lib , buildGoModule , fetchFromGitHub , installShellFiles }: let version = "2022-12-12"; in buildGoModule { pname = "d2"; inherit version; src = fetchFromGitHub { owner = "terrastruct"; repo = "d2"; rev = "a557d1a6edeb18d692c1e1c20c3c0f0cffc2ed21"; sha256 = "sha256-EzaBURGLnxSX+1FjYQLP7oxov7dGk7xhAnpV8DPzW/g="; }; vendorSha256 = "sha256-p0os+ap2k5nYWI4+Hf4pwJfHTXaPJldJmf6nznhuRFA="; ldflags = [ "-s" "-w" "-X oss.terrastruct.com/d2/lib/version.Version=${version}" ]; nativeBuildInputs = [ installShellFiles ]; patches = [ ./patches/402_preserve_leading_comment_spacing.patch ]; postInstall = "installManPage ci/release/template/man/d2.1"; subPackages = [ "." ]; }