mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
{ 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 = [];
|
|
};
|
|
}
|