about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text')
-rw-r--r--nixpkgs/pkgs/tools/text/difftastic/Cargo.lock71
-rw-r--r--nixpkgs/pkgs/tools/text/difftastic/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/text/dos2unix/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/text/gtree/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/text/languagetool-rust/default.nix6
-rw-r--r--nixpkgs/pkgs/tools/text/mdbook-i18n-helpers/default.nix6
-rw-r--r--nixpkgs/pkgs/tools/text/mmdoc/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/text/riffdiff/default.nix6
-rw-r--r--nixpkgs/pkgs/tools/text/tesh/default.nix22
-rw-r--r--nixpkgs/pkgs/tools/text/ugrep/default.nix4
-rw-r--r--nixpkgs/pkgs/tools/text/xml/xml2/default.nix19
-rw-r--r--nixpkgs/pkgs/tools/text/yx/default.nix31
12 files changed, 149 insertions, 32 deletions
diff --git a/nixpkgs/pkgs/tools/text/difftastic/Cargo.lock b/nixpkgs/pkgs/tools/text/difftastic/Cargo.lock
index 1d0974afe898..549f575426c4 100644
--- a/nixpkgs/pkgs/tools/text/difftastic/Cargo.lock
+++ b/nixpkgs/pkgs/tools/text/difftastic/Cargo.lock
@@ -84,9 +84,12 @@ checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e"
 
 [[package]]
 name = "cc"
-version = "1.0.78"
+version = "1.0.83"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d"
+checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
+dependencies = [
+ "libc",
+]
 
 [[package]]
 name = "cfg-if"
@@ -234,7 +237,7 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
 
 [[package]]
 name = "difftastic"
-version = "0.50.0"
+version = "0.51.1"
 dependencies = [
  "assert_cmd",
  "bumpalo",
@@ -245,7 +248,7 @@ dependencies = [
  "glob",
  "hashbrown 0.12.3",
  "humansize",
- "itertools",
+ "itertools 0.11.0",
  "lazy_static",
  "libc",
  "libmimalloc-sys",
@@ -259,6 +262,8 @@ dependencies = [
  "rayon",
  "regex",
  "rustc-hash",
+ "serde",
+ "serde_json",
  "strsim",
  "strum",
  "tree-sitter",
@@ -401,6 +406,21 @@ dependencies = [
 ]
 
 [[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
+
+[[package]]
 name = "lazy_static"
 version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -591,7 +611,7 @@ checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c"
 dependencies = [
  "difflib",
  "float-cmp",
- "itertools",
+ "itertools 0.10.3",
  "normalize-line-endings",
  "predicates-core",
  "regex",
@@ -732,6 +752,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
 
 [[package]]
+name = "ryu"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
+
+[[package]]
 name = "same-file"
 version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -747,6 +773,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
 
 [[package]]
+name = "serde"
+version = "1.0.176"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76dc28c9523c5d70816e393136b86d48909cfb27cecaa902d338c19ed47164dc"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.176"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a4e7b8c5dc823e3b90651ff1d3808419cd14e5ad76de04feaf37da114e7a306f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.27",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
 name = "signal-hook"
 version = "0.3.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -891,9 +948,9 @@ dependencies = [
 
 [[package]]
 name = "typed-arena"
-version = "2.0.1"
+version = "2.0.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae"
+checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
 
 [[package]]
 name = "unicode-ident"
diff --git a/nixpkgs/pkgs/tools/text/difftastic/default.nix b/nixpkgs/pkgs/tools/text/difftastic/default.nix
index 520afe5a3024..77fa6334f16e 100644
--- a/nixpkgs/pkgs/tools/text/difftastic/default.nix
+++ b/nixpkgs/pkgs/tools/text/difftastic/default.nix
@@ -16,13 +16,13 @@ in
 
 rustPlatform.buildRustPackage rec {
   pname = "difftastic";
-  version = "0.50.0";
+  version = "0.51.1";
 
   src = fetchFromGitHub {
     owner = "wilfred";
     repo = pname;
     rev = version;
-    hash = "sha256-CC06Bryn5VNEsW4Wwbo+ubifizCWgpWUE1FsAozZcdg=";
+    hash = "sha256-u03UL5QB0mdMTgRtxVe4pgLlCeLx1cG7czo7uBKQI84=";
   };
 
   cargoLock = {
diff --git a/nixpkgs/pkgs/tools/text/dos2unix/default.nix b/nixpkgs/pkgs/tools/text/dos2unix/default.nix
index a76432d76c05..5505893b4ec6 100644
--- a/nixpkgs/pkgs/tools/text/dos2unix/default.nix
+++ b/nixpkgs/pkgs/tools/text/dos2unix/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   pname = "dos2unix";
-  version = "7.5.0";
+  version = "7.5.1";
 
   src = fetchurl {
     url = "https://waterlan.home.xs4all.nl/dos2unix/${pname}-${version}.tar.gz";
-    sha256 = "sha256-ejsB0B4hTWLCs+BMOpLg3ccoo4VWbkwDVu+mb9brla8=";
+    sha256 = "sha256-2gd4i7LgKbDWP2Rx0Wb2hSis2Nos8UgjoYjoqdXB/BU=";
   };
 
   nativeBuildInputs = [ perl gettext ];
diff --git a/nixpkgs/pkgs/tools/text/gtree/default.nix b/nixpkgs/pkgs/tools/text/gtree/default.nix
index db51febfdc4d..17e04df84453 100644
--- a/nixpkgs/pkgs/tools/text/gtree/default.nix
+++ b/nixpkgs/pkgs/tools/text/gtree/default.nix
@@ -7,13 +7,13 @@
 
 buildGoModule rec {
   pname = "gtree";
-  version = "1.9.5";
+  version = "1.9.6";
 
   src = fetchFromGitHub {
     owner = "ddddddO";
     repo = "gtree";
     rev = "v${version}";
-    hash = "sha256-qbAus0RgocbkC9eOmoiAOoyZw58LPDZlJgoRA/SzhQI=";
+    hash = "sha256-eU5mMUDUh5eMzd4oLc0XOHapt1hhODWXQJ+OJAy3tWc=";
   };
 
   vendorHash = "sha256-QxcDa499XV43p8fstENOtfe3iZ176R5/Ub5iovXlYIM=";
diff --git a/nixpkgs/pkgs/tools/text/languagetool-rust/default.nix b/nixpkgs/pkgs/tools/text/languagetool-rust/default.nix
index 013a24686824..eda1060320c8 100644
--- a/nixpkgs/pkgs/tools/text/languagetool-rust/default.nix
+++ b/nixpkgs/pkgs/tools/text/languagetool-rust/default.nix
@@ -10,16 +10,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "languagetool-rust";
-  version = "2.1.3";
+  version = "2.1.4";
 
   src = fetchFromGitHub {
     owner = "jeertmans";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-iiJSdr7TF1f8/Ve+OKbTDHYWdFkd2IEOzp7Lhlpwb50=";
+    hash = "sha256-YsVK72q+A9T00u9bXIUfGDhwQl5kiLMec6onbp9YKkg=";
   };
 
-  cargoHash = "sha256-oCRlWYCTmJWTi6LCDEKimsLmqm3JTaQEsKJXrvQP/p8=";
+  cargoHash = "sha256-Yit6zWWEcH5LXpcvy9EXUvRNz+JsyW10fauSNBf1BoU=";
 
   buildFeatures = [ "full" ];
 
diff --git a/nixpkgs/pkgs/tools/text/mdbook-i18n-helpers/default.nix b/nixpkgs/pkgs/tools/text/mdbook-i18n-helpers/default.nix
index 4231f1ee65a3..6e4ef6d01ad1 100644
--- a/nixpkgs/pkgs/tools/text/mdbook-i18n-helpers/default.nix
+++ b/nixpkgs/pkgs/tools/text/mdbook-i18n-helpers/default.nix
@@ -5,16 +5,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "mdbook-i18n-helpers";
-  version = "0.2.0";
+  version = "0.2.2";
 
   src = fetchFromGitHub {
     owner = "google";
     repo = "mdbook-i18n-helpers";
     rev = "refs/tags/${version}";
-    hash = "sha256-j5nbAgbCuz8urvdYPTTtGDnWwY/FxKNnwbeSTcuyIKw=";
+    hash = "sha256-ea/z5+QAvQVacP2Yxz9hGh8REjsNbp/rfkDV0f9KyPg=";
   };
 
-  cargoHash = "sha256-lDHq4KRYIeCddhFGQDWOx9olcOASjOke/h22Qm4wv6Q=";
+  cargoHash = "sha256-4Bf6R8sVwJCFiF+j+WePxWy43KuArIuMCzXKc58+TAw=";
 
   meta = with lib; {
     description = "Helpers for a mdbook i18n workflow based on Gettext";
diff --git a/nixpkgs/pkgs/tools/text/mmdoc/default.nix b/nixpkgs/pkgs/tools/text/mmdoc/default.nix
index a570d0b9558e..312a4f94b22f 100644
--- a/nixpkgs/pkgs/tools/text/mmdoc/default.nix
+++ b/nixpkgs/pkgs/tools/text/mmdoc/default.nix
@@ -12,13 +12,13 @@
 
 stdenv.mkDerivation rec {
   pname = "mmdoc";
-  version = "0.15.0";
+  version = "0.19.0";
 
   src = fetchFromGitHub {
     owner = "ryantm";
     repo = "mmdoc";
     rev = version;
-    hash = "sha256-xOi91BSQh+AN13V6YyAzOe7kUsyPAvUKWTJ+PUPlPJQ=";
+    hash = "sha256-W48ndjWrdJphvGDDUtcLZLBzsTfeLCi3k6UrHVroBcA=";
   };
 
   nativeBuildInputs = [ ninja meson pkg-config xxd ];
diff --git a/nixpkgs/pkgs/tools/text/riffdiff/default.nix b/nixpkgs/pkgs/tools/text/riffdiff/default.nix
index f78ddaf9c829..c26966a15817 100644
--- a/nixpkgs/pkgs/tools/text/riffdiff/default.nix
+++ b/nixpkgs/pkgs/tools/text/riffdiff/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "riffdiff";
-  version = "2.25.0";
+  version = "2.25.2";
 
   src = fetchFromGitHub {
     owner = "walles";
     repo = "riff";
     rev = version;
-    hash = "sha256-/V9xp5ew+oL3AIBsgDaAa6LE5Ko/ae7VW47QATtqG1I=";
+    hash = "sha256-JZWgI4yAsk+jtTyS3QZBxdAOPYmUxb7pn1SbcUeCh6Y=";
   };
 
-  cargoHash = "sha256-pWMsmQ4JqlHgdP5TUgwZ6fwdEjKrilI5Rla6XLjaBF8=";
+  cargoHash = "sha256-Z33CGF02rPf24LaYh+wEmmGgPPw+oxMNCgMzCrUEKqk=";
 
   meta = with lib; {
     description = "A diff filter highlighting which line parts have changed";
diff --git a/nixpkgs/pkgs/tools/text/tesh/default.nix b/nixpkgs/pkgs/tools/text/tesh/default.nix
index 7961b120d213..0b702ae0052a 100644
--- a/nixpkgs/pkgs/tools/text/tesh/default.nix
+++ b/nixpkgs/pkgs/tools/text/tesh/default.nix
@@ -1,4 +1,4 @@
-{ python3Packages, fetchFromGitHub }:
+{ python3Packages, fetchFromGitHub, fetchpatch }:
 
 let
   version = "0.3.0";
@@ -12,13 +12,23 @@ in python3Packages.buildPythonPackage rec {
     owner = "OceanSprint";
     repo = "tesh";
     rev = version;
-    sha256 = "sha256-/CSYz2YXbjKZszb1HMOCS+srVJ+TcFSeLeuz9VvtlI4=";
+    hash = "sha256-/CSYz2YXbjKZszb1HMOCS+srVJ+TcFSeLeuz9VvtlI4=";
   };
 
-  prePatch = ''
-      substituteInPlace pyproject.toml \
-      --replace "poetry.masonry" "poetry.core.masonry"
-  '';
+  patches = [
+    # https://github.com/OceanSprint/tesh/pull/49
+    (fetchpatch {
+      name = "replace-poetry-with-poetry-core-1.patch";
+      url = "https://github.com/OceanSprint/tesh/commit/49b90f5a3c9cf111931393248943b1da966dc3ec.patch";
+      hash = "sha256-s+eGO4NXTGbyXcLP37kCg4GDrjAsYIlOwNDR1Q7+1Uc=";
+    })
+    # https://github.com/OceanSprint/tesh/pull/50
+    (fetchpatch {
+      name = "replace-poetry-with-poetry-core-2.patch";
+      url = "https://github.com/OceanSprint/tesh/commit/66798b54f28dc0b72159ee3a2144895cf945eaf0.patch";
+      hash = "sha256-f3uL7TZlkrTOWYihwWNfhrY5/xlBrclAMnbxRNXCGJw=";
+    })
+  ];
 
   checkInputs = [ python3Packages.pytest ];
   nativeBuildInputs = [ python3Packages.poetry-core ];
diff --git a/nixpkgs/pkgs/tools/text/ugrep/default.nix b/nixpkgs/pkgs/tools/text/ugrep/default.nix
index afc986e9c597..159c8ca594ac 100644
--- a/nixpkgs/pkgs/tools/text/ugrep/default.nix
+++ b/nixpkgs/pkgs/tools/text/ugrep/default.nix
@@ -12,13 +12,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "ugrep";
-  version = "4.0.2";
+  version = "4.0.5";
 
   src = fetchFromGitHub {
     owner = "Genivia";
     repo = "ugrep";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-g+COkAdXc1Z3yrObbeBU1wtu9Tr3mEhxrf6Qmy3JywY=";
+    hash = "sha256-7cE8kbj8ChvHOPb1F7Fj9talg82nXpXRPt4oBSGSWZw=";
   };
 
   buildInputs = [
diff --git a/nixpkgs/pkgs/tools/text/xml/xml2/default.nix b/nixpkgs/pkgs/tools/text/xml/xml2/default.nix
index 265ab10e5ac8..d469078c91dc 100644
--- a/nixpkgs/pkgs/tools/text/xml/xml2/default.nix
+++ b/nixpkgs/pkgs/tools/text/xml/xml2/default.nix
@@ -12,6 +12,25 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ libxml2 ];
 
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+
+    echo -n 'checking csv2 and 2csv...'
+    $out/bin/csv2 -f <<< $'a,b\n1,2' \
+      | $out/bin/2csv record a b \
+      | grep -qF '1,2'
+    echo ' ok'
+
+    echo -n 'checking xml2 and 2xml...'
+    $out/bin/xml2 <<< $'<a>abc</a>' \
+      | $out/bin/2xml \
+      | grep -qF '<a>abc</a>'
+    echo ' ok'
+
+    runHook postInstallCheck
+  '';
+
   meta = with lib; {
     homepage = "https://web.archive.org/web/20160515005047/http://dan.egnor.name:80/xml2";
     description = "Tools for command line processing of XML, HTML, and CSV";
diff --git a/nixpkgs/pkgs/tools/text/yx/default.nix b/nixpkgs/pkgs/tools/text/yx/default.nix
new file mode 100644
index 000000000000..bff2b955fb42
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/yx/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchFromGitLab, libyaml }:
+stdenv.mkDerivation rec {
+  pname = "yx";
+  version = "1.0.0";
+
+  src = fetchFromGitLab {
+    owner = "tomalok";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-oY61V9xP0DwRooabzi0XtaFsQa2GwYbuvxfERXQtYcA=";
+  };
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  strictDeps = true;
+
+  buildInputs = [ libyaml ];
+
+  doCheck = true;
+
+  meta = with lib; {
+    description = "YAML Data Extraction Tool";
+    homepage = "https://gitlab.com/tomalok/yx";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ twz123 ];
+    mainProgram = pname;
+  };
+}