tools/pkgs/d2.nix

36 lines
675 B
Nix
Raw Normal View History

2022-11-25 00:13:47 +03:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-12-03"; in
2022-11-25 00:13:47 +03:00
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "c4dc93faeec56ea6dc1dd3bcc57bd7cc9c343311";
sha256 = "sha256-4GpBDAQE9vt9eOH/OoDV8NvO6tJYYalYQyfrLYvnpEw=";
2022-11-25 00:13:47 +03:00
};
vendorSha256 = "sha256-bnayR3jdQZYzeXwcPT8wEkq06oN/5AAD9TgXuwg0WQg=";
2022-11-25 00:13:47 +03:00
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
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
}