34 lines
674 B
Nix
34 lines
674 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
let version = "2022-12-13"; in
|
|
buildGoModule {
|
|
pname = "d2";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "terrastruct";
|
|
repo = "d2";
|
|
rev = "bf139735bf4ae782d9e855d158d27b5c34459ba1";
|
|
sha256 = "sha256-KyOaVIb8l9sewcHtHWDnhdxdFIOjzu0lejTvTs7Pa10=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-sQ8QY4A/IzlnomQETUGPwAqQDd5yyKv98DwctfJ5PSk=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
patches = [ ];
|
|
|
|
postInstall = "installManPage ci/release/template/man/d2.1";
|
|
|
|
subPackages = [ "." ];
|
|
}
|