autocorrect: init at 2.6.2

This commit is contained in:
Candy Cloud 2023-02-11 11:21:14 +00:00
parent d7e2316227
commit b881ca4548
4 changed files with 2424 additions and 0 deletions

2369
pkgs/tools/text/autocorrect/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, Security }:
rustPlatform.buildRustPackage rec {
pname = "autocorrect";
version = "2.6.2";
src = fetchFromGitHub {
owner = "huacnlee";
repo = pname;
rev = "v${version}";
sha256 = "sha256-QHQQrUQCfDAlAtDcfrAkOwRhQkO+HcwnPfJ5+jb1290=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
buildInputs = lib.optional stdenv.isDarwin Security;
cargoBuildFlags = [ "-p" "autocorrect-cli" ];
cargoTestFlags = [ "-p" "autocorrect-cli" ];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "A linter and formatter for help you improve copywriting, to correct spaces, punctuations between CJK (Chinese, Japanese, Korean)";
homepage = "https://huacnlee.github.io/autocorrect";
changelog = "https://github.com/huacnlee/autocorrect/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ candyc1oud ];
};
}

View File

@ -0,0 +1,15 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils curl jq common-updater-scripts cargo
# shellcheck shell=bash
set -euo pipefail
version=$(curl -s https://api.github.com/repos/huacnlee/autocorrect/releases/latest | jq -r .tag_name)
update-source-version autocorrect "${version#v}"
tmp=$(mktemp -d)
trap 'rm -rf -- "${tmp}"' EXIT
git clone --depth 1 --branch "${version}" https://github.com/huacnlee/autocorrect.git "${tmp}/autocorrect"
cargo generate-lockfile --manifest-path "${tmp}/autocorrect/Cargo.toml"
cp "${tmp}/autocorrect/Cargo.lock" "$(dirname "$0")/Cargo.lock"

View File

@ -14006,6 +14006,10 @@ with pkgs;
asciigraph = callPackage ../tools/text/asciigraph { };
autocorrect = callPackage ../tools/text/autocorrect {
inherit (darwin.apple_sdk.frameworks) Security;
};
as31 = callPackage ../development/compilers/as31 { };
asl = callPackage ../development/compilers/asl {