tools/pkgs/d2.nix

35 lines
675 B
Nix

{ 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-LvHffBZD6+Y2XTtnnQk1gFN8RPEN82A0AJkH4Jc7RMY=";
};
vendorSha256 = "sha256-p0os+ap2k5nYWI4+Hf4pwJfHTXaPJldJmf6nznhuRFA=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}