34 lines
629 B
Nix
34 lines
629 B
Nix
|
{ lib
|
||
|
, buildGoModule
|
||
|
, fetchFromGitHub
|
||
|
, installShellFiles
|
||
|
}:
|
||
|
|
||
|
let version = "0.0.13"; in
|
||
|
|
||
|
buildGoModule {
|
||
|
pname = "d2";
|
||
|
inherit version;
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "terrastruct";
|
||
|
repo = "d2";
|
||
|
rev = "v${version}";
|
||
|
sha256 = "sha256-2abGQmgwqxWFk7NScdgfEjRYZF2rw8kxTKRwcl2LRg0=";
|
||
|
};
|
||
|
|
||
|
vendorSha256 = "sha256-/BEl4UqOL4Ux7I2eubNH2YGGl4DxntpI5WN9ggvYu80=";
|
||
|
|
||
|
ldflags = [
|
||
|
"-s"
|
||
|
"-w"
|
||
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
||
|
];
|
||
|
|
||
|
nativeBuildInputs = [ installShellFiles ];
|
||
|
|
||
|
postInstall = "installManPage ci/release/template/man/d2.1";
|
||
|
|
||
|
subPackages = [ "cmd/d2" ];
|
||
|
}
|