diff --git a/pkgs/development/tools/misc/topiary/default.nix b/pkgs/development/tools/misc/topiary/default.nix new file mode 100644 index 000000000000..9a9529bfb5b4 --- /dev/null +++ b/pkgs/development/tools/misc/topiary/default.nix @@ -0,0 +1,28 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "topiary"; + version = "unstable-2022-12-02"; + + src = fetchFromGitHub { + owner = "tweag"; + repo = pname; + rev = "ae861a30097bd6297f553eb0ea2597f86f16d156"; + sha256 = "sha256-WVrl+LxWSbHkbFGbkUhmw4Klwg6CzfnLAz8F0mF0kb8="; + }; + + cargoSha256 = "sha256-qoCOcYp1NYz/YhIBP6AkCCudVLpqhztRehc2xZoYp9A="; + + postInstall = '' + install -Dm444 languages/* -t $out/share/languages + ''; + + TOPIARY_LANGUAGE_DIR = "${placeholder "out"}/share/languages"; + + meta = with lib; { + description = "A uniform formatter for simple languages, as part of the Tree-sitter ecosystem"; + homepage = "https://github.com/tweag/topiary"; + license = licenses.mit; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8733af13fcfa..9655638876d4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12246,6 +12246,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation; }; + topiary = callPackage ../development/tools/misc/topiary { }; + todo = callPackage ../tools/misc/todo { }; tor = callPackage ../tools/security/tor { };