blob: 2e51672363f4317e268bc09feef517be1d8e0c7d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
{ lib, stdenv, rustPlatform, fetchFromGitHub, Security, SystemConfiguration }:
rustPlatform.buildRustPackage rec {
pname = "autocorrect";
version = "2.9.0";
src = fetchFromGitHub {
owner = "huacnlee";
repo = pname;
rev = "v${version}";
sha256 = "sha256-NCDJoKOH4ZaXtGXZ7bgOXrjgrY8Edui+EOOI8/yfW08=";
};
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
buildInputs = lib.optionals stdenv.isDarwin [ Security SystemConfiguration ];
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)";
mainProgram = "autocorrect";
homepage = "https://huacnlee.github.io/autocorrect";
changelog = "https://github.com/huacnlee/autocorrect/releases/tag/v${version}";
license = licenses.mit;
maintainers = [];
};
}
|