2022-11-25 00:13:47 +03:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
2022-12-03 21:32:43 +03:00
|
|
|
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";
|
2022-12-03 21:32:43 +03:00
|
|
|
rev = "c4dc93faeec56ea6dc1dd3bcc57bd7cc9c343311";
|
|
|
|
sha256 = "sha256-4GpBDAQE9vt9eOH/OoDV8NvO6tJYYalYQyfrLYvnpEw=";
|
2022-11-25 00:13:47 +03:00
|
|
|
};
|
|
|
|
|
2022-12-03 21:32:43 +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 ];
|
|
|
|
|
2022-12-03 21:32:43 +03:00
|
|
|
patches = [ ];
|
2022-11-30 15:28:47 +03:00
|
|
|
|
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
|
|
|
}
|