commit a18392fbbff345b78cdbe9d7de67a7e8812bb006
parent c4b954276b093959f8a5b0f1a12301a369742f0b
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Sun, 11 Oct 2020 12:20:47 +0300
Add xtr
Diffstat:
3 files changed, 425 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -893,6 +893,20 @@
"url": "https://github.com/consbio/tpkutils/archive/f4a6799722c61708c6c3a09c981e1d91669ba2d3.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "xtr": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2020-04-17T09:49:07Z",
+ "description": "Translation tools for rust",
+ "homepage": "https://github.com/woboq/tr",
+ "owner": "woboq",
+ "repo": "tr",
+ "rev": "d8e4517fb38f617b23cb050955ad8038342d6f31",
+ "sha256": "0qa7jc42n796yjxg17mm4jw1r8zrnjhwiya6q84zxxw609cvhbjl",
+ "type": "tarball",
+ "url": "https://github.com/woboq/tr/archive/d8e4517fb38f617b23cb050955ad8038342d6f31.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"zdict": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/development/tools/xtr/cargo-lock.patch b/pkgs/development/tools/xtr/cargo-lock.patch
@@ -0,0 +1,391 @@
+diff --git c/Cargo.lock i/Cargo.lock
+new file mode 100644
+index 0000000..1d64459
+--- /dev/null
++++ i/Cargo.lock
+@@ -0,0 +1,385 @@
++# This file is automatically @generated by Cargo.
++# It is not intended for manual editing.
++[[package]]
++name = "aho-corasick"
++version = "0.7.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86"
++dependencies = [
++ "memchr",
++]
++
++[[package]]
++name = "ansi_term"
++version = "0.11.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
++dependencies = [
++ "winapi",
++]
++
++[[package]]
++name = "anyhow"
++version = "1.0.32"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6b602bfe940d21c130f3895acd65221e8a61270debe89d628b9cb4e3ccb8569b"
++
++[[package]]
++name = "atty"
++version = "0.2.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
++dependencies = [
++ "hermit-abi",
++ "libc",
++ "winapi",
++]
++
++[[package]]
++name = "autocfg"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
++
++[[package]]
++name = "bitflags"
++version = "1.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
++
++[[package]]
++name = "byteorder"
++version = "1.3.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
++
++[[package]]
++name = "cc"
++version = "1.0.59"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381"
++
++[[package]]
++name = "chrono"
++version = "0.4.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "942f72db697d8767c22d46a598e01f2d3b475501ea43d0db4f16d90259182d0b"
++dependencies = [
++ "num-integer",
++ "num-traits",
++ "time",
++]
++
++[[package]]
++name = "clap"
++version = "2.33.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
++dependencies = [
++ "ansi_term",
++ "atty",
++ "bitflags",
++ "strsim",
++ "textwrap",
++ "unicode-width",
++ "vec_map",
++]
++
++[[package]]
++name = "encoding"
++version = "0.2.33"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec"
++dependencies = [
++ "encoding-index-japanese",
++ "encoding-index-korean",
++ "encoding-index-simpchinese",
++ "encoding-index-singlebyte",
++ "encoding-index-tradchinese",
++]
++
++[[package]]
++name = "encoding-index-japanese"
++version = "1.20141219.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91"
++dependencies = [
++ "encoding_index_tests",
++]
++
++[[package]]
++name = "encoding-index-korean"
++version = "1.20141219.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81"
++dependencies = [
++ "encoding_index_tests",
++]
++
++[[package]]
++name = "encoding-index-simpchinese"
++version = "1.20141219.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7"
++dependencies = [
++ "encoding_index_tests",
++]
++
++[[package]]
++name = "encoding-index-singlebyte"
++version = "1.20141219.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a"
++dependencies = [
++ "encoding_index_tests",
++]
++
++[[package]]
++name = "encoding-index-tradchinese"
++version = "1.20141219.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18"
++dependencies = [
++ "encoding_index_tests",
++]
++
++[[package]]
++name = "encoding_index_tests"
++version = "0.1.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569"
++
++[[package]]
++name = "gettext"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9ebb594e753d5997e4be036e5a8cf048ab9414352870fb45c779557bbc9ba971"
++dependencies = [
++ "byteorder",
++ "encoding",
++]
++
++[[package]]
++name = "gettext-rs"
++version = "0.4.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "df454a42d8a718280c78666efe0707c120873736961ae91ead898f17ac66ce7c"
++dependencies = [
++ "gettext-sys",
++ "locale_config",
++]
++
++[[package]]
++name = "gettext-sys"
++version = "0.19.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e034c4ba5bb796730a6cc5eb0d654c16885006a7c3d6c6603581ed809434f153"
++dependencies = [
++ "cc",
++]
++
++[[package]]
++name = "hermit-abi"
++version = "0.1.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "lazy_static"
++version = "1.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
++
++[[package]]
++name = "libc"
++version = "0.2.76"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3"
++
++[[package]]
++name = "locale_config"
++version = "0.2.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "73ac19ebe45489e5d53b4346d8b90bb3dd03275c5fdf2ce22a982516d86b535c"
++dependencies = [
++ "lazy_static",
++ "regex",
++ "winapi",
++]
++
++[[package]]
++name = "memchr"
++version = "2.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
++
++[[package]]
++name = "num-integer"
++version = "0.1.43"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b"
++dependencies = [
++ "autocfg",
++ "num-traits",
++]
++
++[[package]]
++name = "num-traits"
++version = "0.2.12"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611"
++dependencies = [
++ "autocfg",
++]
++
++[[package]]
++name = "proc-macro2"
++version = "1.0.19"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"
++dependencies = [
++ "unicode-xid",
++]
++
++[[package]]
++name = "quote"
++version = "1.0.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
++dependencies = [
++ "proc-macro2",
++]
++
++[[package]]
++name = "regex"
++version = "1.3.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
++dependencies = [
++ "aho-corasick",
++ "memchr",
++ "regex-syntax",
++ "thread_local",
++]
++
++[[package]]
++name = "regex-syntax"
++version = "0.6.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
++
++[[package]]
++name = "strsim"
++version = "0.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
++
++[[package]]
++name = "syn"
++version = "1.0.39"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "unicode-xid",
++]
++
++[[package]]
++name = "textwrap"
++version = "0.11.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
++dependencies = [
++ "unicode-width",
++]
++
++[[package]]
++name = "thread_local"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
++dependencies = [
++ "lazy_static",
++]
++
++[[package]]
++name = "time"
++version = "0.1.44"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
++dependencies = [
++ "libc",
++ "wasi",
++ "winapi",
++]
++
++[[package]]
++name = "tr"
++version = "0.1.3"
++dependencies = [
++ "gettext",
++ "gettext-rs",
++ "lazy_static",
++]
++
++[[package]]
++name = "unicode-width"
++version = "0.1.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
++
++[[package]]
++name = "unicode-xid"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
++
++[[package]]
++name = "vec_map"
++version = "0.8.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
++
++[[package]]
++name = "wasi"
++version = "0.10.0+wasi-snapshot-preview1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
++
++[[package]]
++name = "winapi"
++version = "0.3.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
++dependencies = [
++ "winapi-i686-pc-windows-gnu",
++ "winapi-x86_64-pc-windows-gnu",
++]
++
++[[package]]
++name = "winapi-i686-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
++
++[[package]]
++name = "winapi-x86_64-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
++
++[[package]]
++name = "xtr"
++version = "0.1.5"
++dependencies = [
++ "anyhow",
++ "chrono",
++ "clap",
++ "proc-macro2",
++ "syn",
++ "tr",
++]
diff --git a/pkgs/development/tools/xtr/default.nix b/pkgs/development/tools/xtr/default.nix
@@ -0,0 +1,20 @@
+{ lib, rustPlatform, sources }:
+let
+ pname = "xtr";
+ date = lib.substring 0 10 sources.xtr.date;
+ version = "unstable-" + date;
+in
+rustPlatform.buildRustPackage {
+ inherit pname version;
+ src = sources.xtr;
+
+ cargoPatches = [ ./cargo-lock.patch ];
+ cargoSha256 = "1s1w8kdc9wjzvr975vdcrxwj3fvhfksb7ij5rnchz4c4pyzl3xmc";
+
+ meta = with lib; {
+ inherit (sources.xtr) description homepage;
+ license = with licenses; [ agpl3 mit ];
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}