2022-11-25 00:13:47 +03:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
2022-12-12 13:32:56 +03:00
|
|
|
let version = "2022-12-12"; in
|
2022-11-25 00:13:47 +03:00
|
|
|
|
|
|
|
buildGoModule {
|
|
|
|
pname = "d2";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "terrastruct";
|
|
|
|
repo = "d2";
|
2022-12-12 13:32:56 +03:00
|
|
|
rev = "a557d1a6edeb18d692c1e1c20c3c0f0cffc2ed21";
|
2022-12-12 14:01:59 +03:00
|
|
|
sha256 = "sha256-EzaBURGLnxSX+1FjYQLP7oxov7dGk7xhAnpV8DPzW/g=";
|
2022-11-25 00:13:47 +03:00
|
|
|
};
|
|
|
|
|
2022-12-09 13:14:38 +03:00
|
|
|
vendorSha256 = "sha256-p0os+ap2k5nYWI4+Hf4pwJfHTXaPJldJmf6nznhuRFA=";
|
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
|
|
|
}
|