34 lines
674 B
Nix
34 lines
674 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let version = "2023-11-25"; in
|
|
buildGoModule {
|
|
pname = "d2";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "terrastruct";
|
|
repo = "d2";
|
|
rev = "7c1d806eaac22cbe3053c728511213fae577c005";
|
|
sha256 = "sha256-bp45tkV7f6rGDAmhle/e3cHIqa7nPakANvk4QxetLts=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-QMptNFCoJouI555WkA+4TJhaEzQgJJmca3jVpM3neeI=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
patches = [ ];
|
|
|
|
postInstall = "installManPage ci/release/template/man/d2.1";
|
|
|
|
subPackages = [ "." ];
|
|
}
|