tools/pkgs/d2/d2-unwrapped.nix

34 lines
674 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2023-06-10"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "320f80948e744b80c84a61c7eeac07c1c82cf210";
sha256 = "sha256-Oq6bJ/cX+kDyVUVP/RpCIcNeWpT3HESUMmR6mEi9X4Q=";
};
vendorSha256 = "sha256-SocBC/1LrdSQNfcNVa9nnPaq/UvLVIghHlUSJB7ImBk=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}