2022-12-13 17:21:48 +03:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
2023-01-04 06:34:45 +03:00
|
|
|
let version = "2023-01-04"; in
|
2022-12-13 17:21:48 +03:00
|
|
|
buildGoModule {
|
|
|
|
pname = "d2";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "terrastruct";
|
|
|
|
repo = "d2";
|
2023-01-04 06:34:45 +03:00
|
|
|
rev = "80892f9ff9317b709d7176a6bffbbd4ca92bf9a3";
|
|
|
|
sha256 = "sha256-nG4elO7yA58XXCs74Y1CPulYcr7OfeaEA9N7Bfa/X0Y=";
|
2022-12-13 17:21:48 +03:00
|
|
|
};
|
|
|
|
|
2022-12-26 23:26:32 +03:00
|
|
|
vendorSha256 = "sha256-t94xCNteYRpbV2GzrD4ppD8xfUV1HTJPkipEzr36CaM=";
|
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 = [ "." ];
|
|
|
|
}
|