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