tools/pkgs/d2/d2-unwrapped.nix

35 lines
674 B
Nix
Raw Normal View History

2022-12-13 17:21:48 +03:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2023-03-16"; in
2022-12-13 17:21:48 +03:00
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "6d5f2c4f5fcdc4b9aa0086fe5c2a76ff9136d48d";
sha256 = "sha256-d8+8STBnNd+LD2rk2mQKbkurbCqEthI6nVVf4ELBeuE=";
2022-12-13 17:21:48 +03:00
};
vendorSha256 = "sha256-h2OGd/Ql4BTX0tt91lQBvmm41h2kzPgQXawJnrkxn8Y=";
2022-12-13 17:21:48 +03:00
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
2022-12-13 23:14:30 +03:00
patches = [ ];
2022-12-13 17:21:48 +03:00
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}