2022-11-25 00:13:47 +03:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
2022-12-01 16:04:04 +03:00
|
|
|
let version = "2022-12-01"; in
|
2022-11-25 00:13:47 +03:00
|
|
|
|
|
|
|
buildGoModule {
|
|
|
|
pname = "d2";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "terrastruct";
|
|
|
|
repo = "d2";
|
2022-12-01 22:29:17 +03:00
|
|
|
rev = "0cb71095b74c71d2c22f297ff41340867e871f1a";
|
|
|
|
sha256 = "sha256-2TOtVWtqMiPmks7olaXyuvfqIEGsqw1yRRY92sV2v1M=";
|
2022-11-25 00:13:47 +03:00
|
|
|
};
|
|
|
|
|
2022-12-01 16:04:04 +03:00
|
|
|
vendorSha256 = "sha256-uOdUQaUuL48ltJl6YTg1a8v8GmacZpW5OtZafXqjQUo=";
|
2022-11-25 00:13:47 +03:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-12-01 16:04:04 +03:00
|
|
|
patches = [
|
|
|
|
../patches/d2/self_referencing_connections.patch
|
|
|
|
];
|
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
|
|
|
}
|