Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 36 lines 979 B view raw
1{ lib, stdenv, rustPlatform, fetchFromGitHub, Security }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "autocorrect"; 5 version = "2.6.2"; 6 7 src = fetchFromGitHub { 8 owner = "huacnlee"; 9 repo = pname; 10 rev = "v${version}"; 11 sha256 = "sha256-QHQQrUQCfDAlAtDcfrAkOwRhQkO+HcwnPfJ5+jb1290="; 12 }; 13 14 cargoLock = { 15 lockFile = ./Cargo.lock; 16 }; 17 18 postPatch = '' 19 cp ${./Cargo.lock} Cargo.lock 20 ''; 21 22 buildInputs = lib.optional stdenv.isDarwin Security; 23 24 cargoBuildFlags = [ "-p" "autocorrect-cli" ]; 25 cargoTestFlags = [ "-p" "autocorrect-cli" ]; 26 27 passthru.updateScript = ./update.sh; 28 29 meta = with lib; { 30 description = "A linter and formatter for help you improve copywriting, to correct spaces, punctuations between CJK (Chinese, Japanese, Korean)"; 31 homepage = "https://huacnlee.github.io/autocorrect"; 32 changelog = "https://github.com/huacnlee/autocorrect/releases/tag/v${version}"; 33 license = licenses.mit; 34 maintainers = []; 35 }; 36}