35 lines
675 B
Nix
35 lines
675 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let version = "2022-12-03"; in
|
|
|
|
buildGoModule {
|
|
pname = "d2";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "terrastruct";
|
|
repo = "d2";
|
|
rev = "c4dc93faeec56ea6dc1dd3bcc57bd7cc9c343311";
|
|
sha256 = "sha256-4GpBDAQE9vt9eOH/OoDV8NvO6tJYYalYQyfrLYvnpEw=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-bnayR3jdQZYzeXwcPT8wEkq06oN/5AAD9TgXuwg0WQg=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
patches = [ ];
|
|
|
|
postInstall = "installManPage ci/release/template/man/d2.1";
|
|
|
|
subPackages = [ "." ];
|
|
}
|