nixpkgs/pkgs/tools/text/autocorrect/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
979 B
Nix
Raw Normal View History

2023-02-11 11:21:14 +00:00
{ lib, stdenv, rustPlatform, fetchFromGitHub, Security }:
rustPlatform.buildRustPackage rec {
pname = "autocorrect";
2023-08-05 20:14:51 +00:00
version = "2.8.4";
2023-02-11 11:21:14 +00:00
src = fetchFromGitHub {
owner = "huacnlee";
repo = pname;
rev = "v${version}";
2023-08-05 20:14:51 +00:00
sha256 = "sha256-njgngDowyRfOY9+BnBSNWow5GkdGhRu2YPXkA6n23qE=";
2023-02-11 11:21:14 +00:00
};
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;
2023-04-05 00:29:57 +00:00
maintainers = [];
2023-02-11 11:21:14 +00:00
};
}