tools/pkgs/d2.nix

39 lines
783 B
Nix
Raw Normal View History

2022-11-25 00:13:47 +03:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-12-01"; in
2022-11-25 00:13:47 +03:00
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "264a164cf6ed89e27b2720e600c744ef8ae92ed5";
sha256 = "sha256-nMaAkOhz4CuVg5PKZUFIQaNEdHU7vouXP+ayul6YdeA=";
2022-11-25 00:13:47 +03:00
};
vendorSha256 = "sha256-uOdUQaUuL48ltJl6YTg1a8v8GmacZpW5OtZafXqjQUo=";
2022-11-25 00:13:47 +03:00
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
];
2022-11-25 00:13:47 +03:00
postInstall = "installManPage ci/release/template/man/d2.1";
2022-12-01 16:12:30 +03:00
subPackages = [ "." ];
2022-11-25 00:13:47 +03:00
}