2022-12-13 17:21:48 +03:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
2023-04-03 17:26:00 +03:00
|
|
|
let version = "2023-04-03"; in
|
2022-12-13 17:21:48 +03:00
|
|
|
buildGoModule {
|
|
|
|
pname = "d2";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "terrastruct";
|
|
|
|
repo = "d2";
|
2023-04-03 17:26:00 +03:00
|
|
|
rev = "5999cf3dd5d852efede12fca60c9ddd92d8d6fd4";
|
|
|
|
sha256 = "sha256-Dt3WHDBhjziIkGxqAuCwhZsZ7NokF8fc8euCCmEFWCY=";
|
2022-12-13 17:21:48 +03:00
|
|
|
};
|
|
|
|
|
2023-03-20 16:56:54 +03:00
|
|
|
vendorSha256 = "sha256-jfGolYHWX/9Zr5JHiWl8mCfaaRT2AU8v32PtgM1KI8c=";
|
2022-12-13 17:21:48 +03:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-12-13 23:14:30 +03:00
|
|
|
patches = [ ];
|
2022-12-13 17:21:48 +03:00
|
|
|
|
|
|
|
postInstall = "installManPage ci/release/template/man/d2.1";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
}
|