tools/pkgs/d2/d2-unwrapped.nix

34 lines
674 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2023-02-15"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "758446783426613df61a84b70e685fb64282f9ea";
sha256 = "sha256-Sf82OqDyCLUXreY1GmIo4+ePUCBEWOa6eSOlBGcTnZk=";
};
vendorSha256 = "sha256-VUedaPnwLvfnL+WXKGBdeG1eUQynQSYPQSdpUqHixc0=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}