tools/pkgs/d2/d2-unwrapped.nix

34 lines
674 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2022-12-19"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "9aef6b80493878eadc7c846be5bc3b0caeeb4a51";
sha256 = "sha256-IUXHmuQgBBnn/LvVukVVQ0JkAKLl9Fb/jvV8E0R8mgA=";
};
vendorSha256 = "sha256-k9zaZ28vs3R5usWUW5N78zz0PuP5UrYEhgXxpQ+v5sE=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}