tools/pkgs/d2.nix
Dmitriy Pleshevskiy 2b3fe47333
d2: bump to latest master
- d2/patches: expose autoformat subcommand
- d2/patches: update self referencing connection to latest master
2022-12-01 16:04:04 +03:00

53 lines
996 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-12-01"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "264a164cf6ed89e27b2720e600c744ef8ae92ed5";
sha256 = "sha256-nMaAkOhz4CuVg5PKZUFIQaNEdHU7vouXP+ayul6YdeA=";
};
vendorSha256 = "sha256-uOdUQaUuL48ltJl6YTg1a8v8GmacZpW5OtZafXqjQUo=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [
../patches/d2/self_referencing_connections.patch
../patches/d2/expose_autoformat_subcommand.patch
];
postInstall = "installManPage ci/release/template/man/d2.1";
excludedPackages = [
"d2compiler"
"d2ast"
"d2exporter"
"d2format"
"d2graph"
"d2layouts"
"d2lib"
"d2oracle"
"d2parser"
"d2plugin"
"d2renderers"
"d2target"
"d2theme"
"e2etests"
];
}