34 lines
674 B
Nix
34 lines
674 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let version = "2023-03-16"; in
|
|
buildGoModule {
|
|
pname = "d2";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "terrastruct";
|
|
repo = "d2";
|
|
rev = "6d5f2c4f5fcdc4b9aa0086fe5c2a76ff9136d48d";
|
|
sha256 = "sha256-d8+8STBnNd+LD2rk2mQKbkurbCqEthI6nVVf4ELBeuE=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-h2OGd/Ql4BTX0tt91lQBvmm41h2kzPgQXawJnrkxn8Y=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
patches = [ ];
|
|
|
|
postInstall = "installManPage ci/release/template/man/d2.1";
|
|
|
|
subPackages = [ "." ];
|
|
}
|