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
}:
2022-12-19 18:36:40 +03:00
let version = "2022-12-19"; in
2022-12-13 17:21:48 +03:00
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
2022-12-19 18:36:40 +03:00
rev = "9aef6b80493878eadc7c846be5bc3b0caeeb4a51";
sha256 = "sha256-IUXHmuQgBBnn/LvVukVVQ0JkAKLl9Fb/jvV8E0R8mgA=";
2022-12-13 17:21:48 +03:00
};
2022-12-19 18:36:40 +03:00
vendorSha256 = "sha256-k9zaZ28vs3R5usWUW5N78zz0PuP5UrYEhgXxpQ+v5sE=";
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 = [ "." ];
}