tools/pkgs/d2/d2-unwrapped.nix

34 lines
674 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-12-26"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "1efc46d21766bc6fb8cd49ab9ed572e073658b84";
sha256 = "sha256-X+/tBdJvkzHd/6qQKrdR0ox4KX4TuEffBnAD05yLP+I=";
};
vendorSha256 = "sha256-t94xCNteYRpbV2GzrD4ppD8xfUV1HTJPkipEzr36CaM=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}