tools/pkgs/d2_unstable.nix

34 lines
662 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-11-30"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "e6c7d066164040098d294c00779a2248c402c864";
sha256 = "sha256-Qlm5i7l4/ZdVulXVOyry3cwZp7bIDbCXUZ5PngpD9bM=";
};
vendorSha256 = "sha256-yNaocc1iaOHlLqDLql+3XWL9j0RoxBXSWATi7QCNgJI=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "cmd/d2" ];
}