tools/pkgs/d2/d2-unwrapped.nix

34 lines
674 B
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
let version = "2023-02-25"; in
buildGoModule {
pname = "d2";
inherit version;
src = fetchFromGitHub {
owner = "terrastruct";
repo = "d2";
rev = "a2503328a23613609275e9c9ae981e54c1e59f32";
sha256 = "sha256-zhvKB0Prmuai26IhEYK6mqa1XdT+LJUrLNCjsnn1vsk=";
};
vendorSha256 = "sha256-EqIRujKMqIO8XRJ2yAfLOwcDToDM2nkURqg3Sqyjqa0=";
ldflags = [
"-s"
"-w"
"-X oss.terrastruct.com/d2/lib/version.Version=${version}"
];
nativeBuildInputs = [ installShellFiles ];
patches = [ ];
postInstall = "installManPage ci/release/template/man/d2.1";
subPackages = [ "." ];
}