tools/pkgs/d2/d2plugin-tala.nix
Dmitriy Pleshevskiy 66824d2f84
d2: bump to latest master
d2: bump d2plugin-tala to 2.11 version
2023-01-04 06:34:51 +03:00

36 lines
1 KiB
Nix

{ system, stdenv, lib, fetchurl, installShellFiles }:
let
platform = if stdenv.isLinux then "linux" else "darwin";
arch = if lib.hasPrefix "x86_" system then "amd64" else "arm64";
version = "0.2.11";
fileName = "tala-v${version}-${platform}-${arch}.tar.gz";
in
stdenv.mkDerivation {
pname = "d2plugin-tala";
inherit version;
src = fetchurl {
url = "https://github.com/terrastruct/TALA/releases/download/v${version}/${fileName}";
sha256 = "sha256-Ld8GxZvbV6PGZisQah1yePCMtAyPgNHQEU9o4MfXIaA=";
};
nativeBuildInputs = [ installShellFiles ];
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = "tar --strip-component=1 -xf $src";
installPhase = ''
mkdir -p $out/bin
install -Dm555 bin/d2plugin-tala $out/bin
installManPage man/d2plugin-tala.1
installManPage man/tala.1
'';
meta = with lib; {
description = "A diagram layout engine designed specifically for software architecture diagrams";
homepage = "https://terrastruct.com/tala";
license = licenses.unfree;
};
}