uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
50
pkgs/tools/text/a2ps/default.nix
Normal file
50
pkgs/tools/text/a2ps/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, autoconf, bison, libpaper, gperf, file, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "a2ps";
|
||||
version = "4.14";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/a2ps/a2ps-${version}.tar.gz";
|
||||
sha256 = "195k78m1h03m961qn7jr120z815iyb93gwi159p1p9348lyqvbpk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.net/data/main/a/a2ps/1:4.14-1.3/debian/patches/09_CVE-2001-1593.diff";
|
||||
sha256 = "1hrfmvb21zlklmg2fqikgywhqgc4qnvbhx517w87faafrhzhlnh0";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.net/data/main/a/a2ps/1:4.14-1.3/debian/patches/CVE-2014-0466.diff";
|
||||
sha256 = "0grqqsc3m45niac56m19m5gx7gc0m8zvia5iman1l4rlq31shf8s";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "CVE-2015-8107.patch";
|
||||
url = "https://sources.debian.net/data/main/a/a2ps/1:4.14-1.3/debian/patches/fix-format-security.diff";
|
||||
sha256 = "0pq7zl41gf2kc6ahwyjnzn93vbxb4jc2c5g8j20isp4vw6dqrnwv";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace afm/make_fonts_map.sh --replace "/bin/rm" "rm"
|
||||
substituteInPlace tests/defs.in --replace "/bin/rm" "rm"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoconf file bison perl ];
|
||||
buildInputs = [ libpaper gperf ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An Anything to PostScript converter and pretty-printer";
|
||||
longDescription = ''
|
||||
GNU a2ps converts files into PostScript for printing or viewing. It uses a nice default format,
|
||||
usually two pages on each physical page, borders surrounding pages, headers with useful information
|
||||
(page number, printing date, file name or supplied header), line numbering, symbol substitution as
|
||||
well as pretty printing for a wide range of programming languages.
|
||||
'';
|
||||
homepage = "https://www.gnu.org/software/a2ps/";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.bennofs ];
|
||||
platforms = platforms.linux;
|
||||
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/text/agrep/default.nix
Normal file
32
pkgs/tools/text/agrep/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "agrep";
|
||||
version = "3.41.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Wikinaut";
|
||||
repo = "agrep";
|
||||
# This repository has numbered versions, but not Git tags.
|
||||
rev = "eef20411d605d9d17ead07a0ade75046f2728e21";
|
||||
sha256 = "14addnwspdf2mxpqyrw8b84bb2257y43g5ccy4ipgrr91fmxq2sk";
|
||||
};
|
||||
|
||||
# Related: https://github.com/Wikinaut/agrep/pull/11
|
||||
prePatch = lib.optionalString (stdenv.hostPlatform.isMusl || stdenv.isDarwin) ''
|
||||
sed -i '1i#include <sys/stat.h>' checkfil.c newmgrep.c recursiv.c
|
||||
'';
|
||||
installPhase = ''
|
||||
install -Dm 555 agrep -t "$out/bin"
|
||||
install -Dm 444 docs/* -t "$out/doc"
|
||||
'';
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Approximate grep for fast fuzzy string searching";
|
||||
homepage = "https://www.tgries.de/agrep/";
|
||||
license = licenses.isc;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/text/aha/default.nix
Normal file
28
pkgs/tools/text/aha/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aha";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "1gywad0rvvz3c5balz8cxsnx0562hj2ngzqyr8zsy2mb4pn0lpgv";
|
||||
rev = version;
|
||||
repo = "aha";
|
||||
owner = "theZiz";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "ANSI HTML Adapter";
|
||||
longDescription = ''
|
||||
aha takes ANSI SGR-coloured input and produces W3C-conformant HTML code.
|
||||
'';
|
||||
homepage = "https://github.com/theZiz/aha";
|
||||
license = with licenses; [ lgpl2Plus mpl11 ];
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
22
pkgs/tools/text/align/default.nix
Normal file
22
pkgs/tools/text/align/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "align";
|
||||
version = "1.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Guitarbum722";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "17gs3417633z71kc6l5zqg4b3rjhpn2v8qs8rnfrk4nbwzz4nrq3";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Guitarbum722/align";
|
||||
description = "A general purpose application and library for aligning text";
|
||||
maintainers = with maintainers; [ hrhino ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/text/amber/default.nix
Normal file
26
pkgs/tools/text/amber/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform
|
||||
, libiconv, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "amber";
|
||||
version = "0.5.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dalance";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-mmgJCD7kJjvpxyagsoe5CSzqIEZcIiYMAMP3axRphv4=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-opRinhTmhZxpAwHNiVOLXL8boQf09Y1NXrWQ6HWQYQ0=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A code search-and-replace tool";
|
||||
homepage = "https://github.com/dalance/amber";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = [ maintainers.bdesham ];
|
||||
};
|
||||
}
|
||||
22
pkgs/tools/text/anewer/default.nix
Normal file
22
pkgs/tools/text/anewer/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "anewer";
|
||||
version = "0.1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ysf";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "181mi674354bddnq894yyq587w7skjh35vn61i41vfi6lqz5dy3d";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-LJ0l5CZM5NqdbCZe4ELkYf9EkKyBxL/LrNmFy+JS6gM=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Append lines from stdin to a file if they don't already exist in the file";
|
||||
homepage = "https://github.com/ysf/anewer";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/text/angle-grinder/default.nix
Normal file
26
pkgs/tools/text/angle-grinder/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "angle-grinder";
|
||||
version = "0.18.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rcoh";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-kohw95pvcBLviPgTDGWIbvZuz1cJmKh4eB0Bx4AEk1E=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-m44hFYcyQ1yRf1O5OlomF7rEpkdnnX3FNhB8kUdriKg=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Slice and dice logs on the command line";
|
||||
homepage = "https://github.com/rcoh/angle-grinder";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ bbigras ];
|
||||
mainProgram = "agrind";
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/text/ansifilter/default.nix
Normal file
37
pkgs/tools/text/ansifilter/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ fetchurl, lib, stdenv, pkg-config, boost, lua }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ansifilter";
|
||||
version = "2.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.andre-simon.de/zip/ansifilter-${version}.tar.bz2";
|
||||
sha256 = "sha256-Zs8BfTakPV9q4gYJzjtYZHSU7mwOQfxoLFmL/859fTk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ boost lua ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/makefile --replace "CC=g++" "CC=c++"
|
||||
# avoid timestamp non-determinism with '-n'
|
||||
substituteInPlace makefile --replace 'gzip -9f' 'gzip -9nf'
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
"conf_dir=/etc/ansifilter"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool to convert ANSI to other formats";
|
||||
longDescription = ''
|
||||
Tool to remove ANSI or convert them to another format
|
||||
(HTML, TeX, LaTeX, RTF, Pango or BBCode)
|
||||
'';
|
||||
homepage = "http://www.andre-simon.de/doku/ansifilter/en/ansifilter.php";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.Adjective-Object ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/text/ascii/default.nix
Normal file
27
pkgs/tools/text/ascii/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ascii";
|
||||
version = "3.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.catb.org/~esr/ascii/${pname}-${version}.tar.gz";
|
||||
sha256 = "0b87vy06s8s3a8q70pqavsbk4m4ff034sdml2xxa6qfsykaj513j";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
sed -i -e "s|^PREFIX = .*|PREFIX = $out|" Makefile
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -vp "$out/bin" "$out/share/man/man1"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interactive ASCII name and synonym chart";
|
||||
homepage = "http://www.catb.org/~esr/ascii/";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/text/asciigraph/default.nix
Normal file
24
pkgs/tools/text/asciigraph/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "asciigraph";
|
||||
version = "0.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "guptarohit";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-7sobelRCDY8mC5FYyGZmNsvUsEMxRulqPnUucNRN5J8=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/guptarohit/asciigraph";
|
||||
description = "Lightweight ASCII line graph ╭┈╯ command line app";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ mmahut ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/text/bashblog/0001-Setting-markdown_bin.patch
Normal file
25
pkgs/tools/text/bashblog/0001-Setting-markdown_bin.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 1990ac93c9dbf3ada0eb2f045ef1aa95bbef7018 Mon Sep 17 00:00:00 2001
|
||||
From: "P. R. d. O" <d.ol.rod@tutanota.com>
|
||||
Date: Thu, 21 Apr 2022 07:40:30 -0600
|
||||
Subject: [PATCH] Setting markdown_bin
|
||||
|
||||
---
|
||||
bb.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/bb.sh b/bb.sh
|
||||
index 9d8e645..40fb54d 100755
|
||||
--- a/bb.sh
|
||||
+++ b/bb.sh
|
||||
@@ -160,7 +160,7 @@ global_variables() {
|
||||
|
||||
# Markdown location. Trying to autodetect by default.
|
||||
# The invocation must support the signature 'markdown_bin in.md > out.html'
|
||||
- [[ -f Markdown.pl ]] && markdown_bin=./Markdown.pl || markdown_bin=$(which Markdown.pl 2>/dev/null || which markdown 2>/dev/null)
|
||||
+ markdown_bin=@markdown_path@
|
||||
}
|
||||
|
||||
# Check for the validity of some variables
|
||||
--
|
||||
2.35.1
|
||||
|
||||
63
pkgs/tools/text/bashblog/default.nix
Normal file
63
pkgs/tools/text/bashblog/default.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchzip
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, substituteAll
|
||||
, perlPackages
|
||||
# Flags to enable processors
|
||||
# Currently, Markdown.pl does not work
|
||||
, usePandoc ? true
|
||||
, pandoc }:
|
||||
|
||||
let
|
||||
inherit (perlPackages) TextMarkdown;
|
||||
# As bashblog supports various markdown processors
|
||||
# we can set flags to enable a certain processor
|
||||
markdownpl_path = "${perlPackages.TextMarkdown}/bin/Markdown.pl";
|
||||
pandoc_path = "${pandoc}/bin/pandoc";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "bashblog";
|
||||
version = "unstable-2022-03-26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cfenollosa";
|
||||
repo = "bashblog";
|
||||
rev = "c3d4cc1d905560ecfefce911c319469f7a7ff8a8";
|
||||
sha256 = "sha256-THlP/JuaZzDq9QctidwLRiUVFxRhGNhRKleWbQiqsgg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [ TextMarkdown ]
|
||||
++ lib.optionals usePandoc [ pandoc ];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./0001-Setting-markdown_bin.patch;
|
||||
markdown_path = if usePandoc then pandoc_path else markdownpl_path;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs bb.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
install -Dm755 bb.sh $out/bin/bashblog
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A single Bash script to create blogs";
|
||||
homepage = "https://github.com/cfenollosa/bashblog";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ wolfangaukang ];
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/text/boxes/default.nix
Normal file
47
pkgs/tools/text/boxes/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bison, flex }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "boxes";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ascii-boxes";
|
||||
repo = "boxes";
|
||||
rev = "v${version}";
|
||||
sha256 = "0b12rsynrmkldlwcb62drk33kk0aqwbj10mq5y5x3hjf626gjwsi";
|
||||
};
|
||||
|
||||
# Building instructions:
|
||||
# https://boxes.thomasjensen.com/build.html#building-on-linux--unix
|
||||
nativeBuildInputs = [ bison flex ];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
# Makefile references a system wide config file in '/usr/share'. Instead, we
|
||||
# move it within the store by default.
|
||||
preBuild = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "GLOBALCONF = /usr/share/boxes" \
|
||||
"GLOBALCONF=${placeholder "out"}/share/boxes/boxes-config"
|
||||
'';
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 -t $out/bin src/boxes
|
||||
install -Dm644 -t $out/share/boxes boxes-config
|
||||
install -Dm644 -t $out/share/man/man1 doc/boxes.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command line ASCII boxes unlimited!";
|
||||
longDescription = ''
|
||||
Boxes is a command line filter program that draws ASCII art boxes around
|
||||
your input text.
|
||||
'';
|
||||
homepage = "https://boxes.thomasjensen.com";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ waiting-for-dev ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/text/catdoc/default.nix
Normal file
33
pkgs/tools/text/catdoc/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "catdoc";
|
||||
version = "0.95";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ftp.wagner.pp.ru/pub/catdoc/${pname}-${version}.tar.gz";
|
||||
sha256 = "514a84180352b6bf367c1d2499819dfa82b60d8c45777432fa643a5ed7d80796";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/c/catdoc/1:0.95-4.1/debian/patches/05-CVE-2017-11110.patch";
|
||||
sha256 = "1ljnwvssvzig94hwx8843b88p252ww2lbxh8zybcwr3kwwlcymx7";
|
||||
})
|
||||
];
|
||||
|
||||
# Remove INSTALL file to avoid `make` misinterpreting it as an up-to-date
|
||||
# target on case-insensitive filesystems e.g. Darwin
|
||||
preInstall = ''
|
||||
rm -v INSTALL
|
||||
'';
|
||||
|
||||
configureFlags = [ "--disable-wordview" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "MS-Word/Excel/PowerPoint to text converter";
|
||||
platforms = platforms.all;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/text/catdocx/default.nix
Normal file
31
pkgs/tools/text/catdocx/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, lib, fetchFromGitHub, makeWrapper, unzip, catdoc }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "catdocx";
|
||||
version = "unstable-2017-01-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jncraton";
|
||||
repo = "catdocx";
|
||||
rev = "04fa0416ec1f116d4996685e219f0856d99767cb";
|
||||
sha256 = "1sxiqhkvdqn300ygfgxdry2dj2cqzjhkzw13c6349gg5vxfypcjh";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/libexec $out/bin
|
||||
cp catdocx.sh $out/libexec
|
||||
chmod +x $out/libexec/catdocx.sh
|
||||
wrapProgram $out/libexec/catdocx.sh --prefix PATH : "${lib.makeBinPath [ unzip catdoc ]}"
|
||||
ln -s $out/libexec/catdocx.sh $out/bin/catdocx
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extracts plain text from docx files";
|
||||
homepage = "https://github.com/jncraton/catdocx";
|
||||
license = with licenses; [ bsd3 ];
|
||||
maintainers = [ maintainers.michalrus ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/text/cconv/default.nix
Normal file
24
pkgs/tools/text/cconv/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoreconfHook, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cconv";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xiaoyjy";
|
||||
repo = "cconv";
|
||||
rev = "v${version}";
|
||||
sha256 = "RAFl/+I+usUfeG/l17F3ltThK7G4+TekyQGwzQIgeH8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = [ libiconv ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A iconv based simplified-traditional chinese conversion tool";
|
||||
homepage = "https://github.com/xiaoyjy/cconv";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.redfish64 ];
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/text/chars/default.nix
Normal file
28
pkgs/tools/text/chars/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "chars";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "antifuchs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-aswosSXAh0wkO4N/y/H54dufMDrloWjpjrSWHvHR1rc=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-CqPmasdpXWjCn65G2Ua0h3v+TVP0QPFAdtKOFyoYW/0=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Commandline tool to display information about unicode characters";
|
||||
homepage = "https://github.com/antifuchs/chars";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ bbigras ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/text/choose/default.nix
Normal file
25
pkgs/tools/text/choose/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "choose";
|
||||
version = "1.3.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "theryangeary";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-yW1quDyQn2xhrlhhPj9DKq7g8LlYKvEKDFj3xSagRTU=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-0INC0LFzlnFnt5pCiU4xePxU8a6GiU1L8bg7zcuFl2k=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A human-friendly and fast alternative to cut and (sometimes) awk";
|
||||
homepage = "https://github.com/theryangeary/choose";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ sohalt ];
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/text/chroma/default.nix
Normal file
37
pkgs/tools/text/chroma/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
srcInfo = lib.importJSON ./src.json;
|
||||
in
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "chroma";
|
||||
version = "0.10.0";
|
||||
|
||||
# To update:
|
||||
# nix-prefetch-git --rev v${version} https://github.com/alecthomas/chroma.git > src.json
|
||||
src = fetchFromGitHub {
|
||||
owner = "alecthomas";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
inherit (srcInfo) sha256;
|
||||
};
|
||||
|
||||
vendorSha256 = "09b718vjd6npg850fr7z6srs2sc5vsr7byzlz5yb5qx0vm3ajxpf";
|
||||
|
||||
modRoot = "./cmd/chroma";
|
||||
|
||||
# substitute version info as done in goreleaser builds
|
||||
ldflags = [
|
||||
"-X" "main.version=${version}"
|
||||
"-X" "main.commit=${srcInfo.rev}"
|
||||
"-X" "main.date=${srcInfo.date}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/alecthomas/chroma";
|
||||
description = "A general purpose syntax highlighter in pure Go";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
};
|
||||
}
|
||||
11
pkgs/tools/text/chroma/src.json
Normal file
11
pkgs/tools/text/chroma/src.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"url": "https://github.com/alecthomas/chroma.git",
|
||||
"rev": "36bdd4b98823bd1d7be96767cde3dd575e60b406",
|
||||
"date": "2022-01-12T21:49:38+11:00",
|
||||
"path": "/nix/store/951ya4wlxp217a2j3qdni29zwqfq0z7v-chroma",
|
||||
"sha256": "0hjzb61m5lzx95xss82wil9s8f9hbw1zb3jj73ljfwkq5lqk76zq",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
25
pkgs/tools/text/cidrgrep/default.nix
Normal file
25
pkgs/tools/text/cidrgrep/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule {
|
||||
pname = "cidrgrep";
|
||||
version = "unstable-2020-11-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomdoherty";
|
||||
repo = "cidrgrep";
|
||||
rev = "8ad5af533e8dc33ea18ff19b7c6a41550748fe0e";
|
||||
hash = "sha256-Bp1cST6/8ppvpgNxjUpwL498C9vTJmoWOKLJgmWqfEs=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/cmd $out/bin/cidrgrep
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Like grep but for IPv4 CIDRs";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ das_j ];
|
||||
};
|
||||
}
|
||||
45
pkgs/tools/text/cmigemo/default.nix
Normal file
45
pkgs/tools/text/cmigemo/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchurl, buildPackages
|
||||
, libiconv, nkf, perl, which
|
||||
, skk-dicts
|
||||
}:
|
||||
|
||||
let
|
||||
iconvBin = if stdenv.isDarwin then libiconv else buildPackages.stdenv.cc.libc;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "cmigemo";
|
||||
version = "1.3e";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "koron";
|
||||
repo = "cmigemo";
|
||||
rev = "5c014a885972c77e67d0d17d367d05017c5873f7";
|
||||
sha256 = "0xrblwhaf70m0knkd5584iahaq84rlk0926bhdsrzmakpw77hils";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ libiconv nkf perl which ];
|
||||
|
||||
postUnpack = ''
|
||||
cp ${skk-dicts}/share/SKK-JISYO.L source/dict/
|
||||
'';
|
||||
|
||||
patches = [ ./no-http-tool-check.patch ];
|
||||
|
||||
makeFlags = [ "INSTALL=install" ];
|
||||
|
||||
preBuild = ''
|
||||
makeFlagsArray+=(FILTER_UTF8="${lib.getBin iconvBin}/bin/iconv -t utf-8 -f cp932")
|
||||
'';
|
||||
|
||||
buildFlags = [ (if stdenv.isDarwin then "osx-all" else "gcc-all") ];
|
||||
|
||||
installTargets = [ (if stdenv.isDarwin then "osx-install" else "gcc-install") ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool that supports Japanese incremental search with Romaji";
|
||||
homepage = "https://www.kaoriya.net/software/cmigemo";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.cohei ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/text/cmigemo/no-http-tool-check.patch
Normal file
23
pkgs/tools/text/cmigemo/no-http-tool-check.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/configure b/configure
|
||||
index 4480261..2fb9b34 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -28,18 +28,6 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
-# Check HTTP access tool
|
||||
-if CHECK_COMMAND curl ; then
|
||||
- PROGRAM_HTTP="curl -O"
|
||||
-elif CHECK_COMMAND wget ; then
|
||||
- PROGRAM_HTTP="wget"
|
||||
-elif CHECK_COMMAND fetch ; then
|
||||
- PROGRAM_HTTP="fetch"
|
||||
-else
|
||||
- echo "ERROR: Require one of HTTP access tools (curl, wget or fetch)."
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
# Check encoding filter
|
||||
if CHECK_COMMAND qkc ; then
|
||||
PROGRAM_ENCODEFILTER="qkc -q -u"
|
||||
24
pkgs/tools/text/codesearch/default.nix
Normal file
24
pkgs/tools/text/codesearch/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "codesearch";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "codesearch";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-i03w8PZ31j5EutUZaamZsHz+z4qgX4prePbj5DLA78s=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast, indexed regexp search over large file trees";
|
||||
homepage = "https://github.com/google/codesearch";
|
||||
license = [ licenses.bsd3 ];
|
||||
maintainers = with maintainers; [ bennofs ];
|
||||
};
|
||||
}
|
||||
39
pkgs/tools/text/colordiff/default.nix
Normal file
39
pkgs/tools/text/colordiff/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchFromGitHub, docbook_xml_dtd_412, docbook_xsl, perl, w3m, xmlto, diffutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "colordiff";
|
||||
version = "1.0.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "daveewart";
|
||||
repo = "colordiff";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+TtVnUX88LMd8zmhLsKTyR9JlgR7IkUB18PF3LRgPB0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ docbook_xml_dtd_412 docbook_xsl perl w3m xmlto ];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace 'TMPDIR=colordiff-''${VERSION}' ""
|
||||
|
||||
substituteInPlace colordiff.pl \
|
||||
--replace '= "diff";' '= "${diffutils}/bin/diff";'
|
||||
'';
|
||||
|
||||
installFlags = [
|
||||
"INSTALL_DIR=/bin"
|
||||
"MAN_DIR=/share/man/man1"
|
||||
"DESTDIR=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Wrapper for 'diff' that produces the same output but with pretty 'syntax' highlighting";
|
||||
homepage = "https://www.colordiff.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/text/coloursum/default.nix
Normal file
24
pkgs/tools/text/coloursum/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "coloursum";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ticky";
|
||||
repo = "coloursum";
|
||||
rev = "v${version}";
|
||||
sha256 = "1piz0l7qdcvjzfykm6rzqc8s1daxp3cj3923v9cmm41bc2v0p5q0";
|
||||
};
|
||||
|
||||
cargoSha256 = "08l01ivmln9gwabwa1p0gk454qyxlcpnlxx840vys476f4pw7vvf";
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Colourise your checksum output";
|
||||
homepage = "https://github.com/ticky/coloursum";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/text/convertlit/default.nix
Normal file
37
pkgs/tools/text/convertlit/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{lib, stdenv, fetchzip, libtommath}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "convertlit";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchzip {
|
||||
url = "http://www.convertlit.com/convertlit${lib.replaceStrings ["."] [""] version}src.zip";
|
||||
sha256 = "182nsin7qscgbw2h92m0zadh3h8q410h5cza6v486yjfvla3dxjx";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
buildInputs = [libtommath];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
buildPhase = ''
|
||||
cd lib
|
||||
make
|
||||
cd ../clit18
|
||||
substituteInPlace Makefile \
|
||||
--replace ../libtommath-0.30/libtommath.a -ltommath
|
||||
make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp clit $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.convertlit.com/";
|
||||
description = "A tool for converting Microsoft Reader ebooks to more open formats";
|
||||
license = lib.licenses.gpl2;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/text/copyright-update/default.nix
Normal file
26
pkgs/tools/text/copyright-update/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "copyright-update";
|
||||
version = "2016.1018";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
name = "${pname}-${version}-src";
|
||||
owner = "jaalto";
|
||||
repo = "project--copyright-update";
|
||||
rev = "release/${version}";
|
||||
sha256 = "1kj6jlgyxrgvrpv7fcgbibfqqa83xljp17v6sas42dlb105h6sgd";
|
||||
};
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
installFlags = [ "INSTALL=install" "prefix=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/jaalto/project--copyright-update";
|
||||
description = "Updates the copyright information in a set of files";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.rycee ];
|
||||
};
|
||||
}
|
||||
51
pkgs/tools/text/crowdin-cli/default.nix
Normal file
51
pkgs/tools/text/crowdin-cli/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, gawk
|
||||
, git
|
||||
, gnugrep
|
||||
, installShellFiles
|
||||
, jre
|
||||
, makeWrapper
|
||||
, crowdin-cli
|
||||
, testers
|
||||
, unzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "crowdin-cli";
|
||||
version = "3.7.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/crowdin/${pname}/releases/download/${version}/${pname}.zip";
|
||||
sha256 = "sha256-z9c12KKrh4hV7A92qinNCQGTxZI6IsmJ3Z+3ZcZZljk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles makeWrapper unzip ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D crowdin-cli.jar $out/lib/crowdin-cli.jar
|
||||
|
||||
installShellCompletion --cmd crowdin --bash ./crowdin_completion
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/crowdin \
|
||||
--argv0 crowdin \
|
||||
--add-flags "-jar $out/lib/crowdin-cli.jar" \
|
||||
--prefix PATH : ${lib.makeBinPath [ gawk gnugrep git ]}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = crowdin-cli; };
|
||||
|
||||
meta = with lib; {
|
||||
mainProgram = "crowdin";
|
||||
homepage = "https://github.com/crowdin/crowdin-cli/";
|
||||
description = "A command-line client for the Crowdin API";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ DamienCassou ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/text/csvdiff/default.nix
Normal file
25
pkgs/tools/text/csvdiff/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "csvdiff";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aswinkarthik";
|
||||
repo = "csvdiff";
|
||||
rev = "v${version}";
|
||||
sha256 = "0cd1ikxsypjqisfnmr7zix3g7x8p892w77086465chyd39gpk97b";
|
||||
};
|
||||
|
||||
vendorSha256 = "1612s4kc0r8zw5y2n6agwdx9kwhxkdrjzagn4g22lzmjq02a64xf";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://aswinkarthik.github.io/csvdiff/";
|
||||
description = "A fast diff tool for comparing csv files";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ turion ];
|
||||
};
|
||||
}
|
||||
22
pkgs/tools/text/csview/default.nix
Normal file
22
pkgs/tools/text/csview/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ fetchFromGitHub, lib, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "csview";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wfxr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-tllwFUC+Si3PsYPmiO86D3PNdInuIxxhZW5dAuU4K14=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-j9CwldmxjWYVuiWfAHIV0kr5k/p1BFWHzZiVrv8m7uI=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A high performance csv viewer with cjk/emoji support";
|
||||
homepage = "https://github.com/wfxr/csview";
|
||||
license = with licenses; [ mit /* or */ asl20 ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/text/csvkit/default.nix
Normal file
42
pkgs/tools/text/csvkit/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, fetchpatch, python3 }:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "csvkit";
|
||||
version = "1.0.5";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1ffmbzk4rxnl1yhqfl58v7kvl5m9cbvjm8v7xp4mvr00sgs91lvv";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixes a failing dbf related test. Won't be needed on 1.0.6 or later.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/wireservice/csvkit/commit/5f22e664121b13d9ff005a9206873a8f97431dca.patch";
|
||||
sha256 = "1kg00z65x7l6dnm5nfsr5krs8m7mv23hhb1inkaqf5m5fpkpnvv7";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
agate
|
||||
agate-excel
|
||||
agate-dbf
|
||||
agate-sql
|
||||
six
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = with python3.pkgs; [
|
||||
nose
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "csvkit" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A suite of command-line tools for converting to and working with CSV";
|
||||
maintainers = with maintainers; [ vrthra ];
|
||||
license = licenses.mit;
|
||||
homepage = "https://github.com/wireservice/csvkit";
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/text/dadadodo/default.nix
Normal file
27
pkgs/tools/text/dadadodo/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dadadodo";
|
||||
version = "1.04";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.jwz.org/dadadodo/${pname}-${version}.tar.gz";
|
||||
sha256 = "1pzwp3mim58afjrc92yx65mmgr1c834s1v6z4f4gyihwjn8bn3if";
|
||||
};
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp dadadodo $out/bin
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Markov chain-based text generator";
|
||||
homepage = "http://www.jwz.org/dadadodo";
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/text/dcs/default.nix
Normal file
47
pkgs/tools/text/dcs/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, yuicompressor
|
||||
, zopfli
|
||||
, stdenv
|
||||
}:
|
||||
buildGoModule {
|
||||
pname = "dcs";
|
||||
version = "unstable-2021-04-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Debian";
|
||||
repo = "dcs";
|
||||
rev = "da46accc4d55e9bfde1a6852ac5a9e730fcbbb2c";
|
||||
sha256 = "N+6BXlKn1YTlh0ZdPNWa0nuJNcQtlUIc9TocM8cbzQk=";
|
||||
};
|
||||
|
||||
vendorSha256 = "l2mziuisx0HzuP88rS5M+Wha6lu8P036wJYZlmzjWfs=";
|
||||
|
||||
# Depends on dcs binaries
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [
|
||||
yuicompressor
|
||||
zopfli
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
make -C static -j$NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/dcs
|
||||
cp -r cmd/dcs-web/templates $out/share/dcs
|
||||
cp -r static $out/share/dcs
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Debian Code Search";
|
||||
homepage = "https://github.com/Debian/dcs";
|
||||
license = licenses.bsd3;
|
||||
maintainers = teams.determinatesystems.members;
|
||||
broken = stdenv.isAarch64
|
||||
|| stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dcs.x86_64-darwin
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/text/dfmt/default.nix
Normal file
27
pkgs/tools/text/dfmt/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib
|
||||
, python3
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python3.pkgs)
|
||||
buildPythonApplication
|
||||
fetchPypi
|
||||
pythonOlder;
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
pname = "dfmt";
|
||||
version = "1.2.0";
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "7af6360ca8d556f1cfe82b97f03b8d1ea5a9d6de1fa3018290c844b6566d9d6e";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Format paragraphs, comments and doc strings";
|
||||
homepage = "https://github.com/dmerejkowsky/dfmt";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ cole-h ];
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/text/diction/default.nix
Normal file
23
pkgs/tools/text/diction/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "diction";
|
||||
version = "1.13";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.moria.de/~michael/diction/${pname}-${version}.tar.gz";
|
||||
sha256 = "08fi971b8qa4xycxbgb42i6b5ms3qx9zpp5hwpbxy2vypfs0wph9";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "GNU style and diction utilities";
|
||||
longDescription = ''
|
||||
Diction and style are two old standard Unix commands. Diction identifies
|
||||
wordy and commonly misused phrases. Style analyses surface
|
||||
characteristics of a document, including sentence length and other
|
||||
readability measures.
|
||||
'';
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/text/diffr/default.nix
Normal file
28
pkgs/tools/text/diffr/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "diffr";
|
||||
version = "0.1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mookid";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "18ks5g4bx6iz9hdjxmi6a41ncxpb1hnsscdlddp2gr40k3vgd0pa";
|
||||
};
|
||||
|
||||
cargoSha256 = "0pn3vqv13n29h8069a38306vjlzlxf1m08ldv7lpzgqxhl8an00r";
|
||||
|
||||
buildInputs = (lib.optional stdenv.isDarwin Security);
|
||||
|
||||
preCheck = ''
|
||||
export DIFFR_TESTS_BINARY_PATH=$releaseDir/diffr
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yet another diff highlighting tool";
|
||||
homepage = "https://github.com/mookid/diffr";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/text/diffstat/default.nix
Normal file
27
pkgs/tools/text/diffstat/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ fetchurl, lib, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "diffstat";
|
||||
version = "1.64";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"ftp://ftp.invisible-island.net/diffstat/diffstat-${version}.tgz"
|
||||
"https://invisible-mirror.net/archives/diffstat/diffstat-${version}.tgz"
|
||||
];
|
||||
sha256 = "sha256-uK7jjZ0uHQWSbmtVgQqdLC3UB/JNaiZzh1Y6RDbj9/w=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Read output of diff and display a histogram of the changes";
|
||||
longDescription = ''
|
||||
diffstat reads the output of diff and displays a histogram of the
|
||||
insertions, deletions, and modifications per-file. It is useful for
|
||||
reviewing large, complex patch files.
|
||||
'';
|
||||
homepage = "https://invisible-island.net/diffstat/";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
55
pkgs/tools/text/difftastic/default.nix
Normal file
55
pkgs/tools/text/difftastic/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, rustPlatform
|
||||
, tree-sitter
|
||||
, difftastic
|
||||
, testers
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "difftastic";
|
||||
version = "0.28.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wilfred";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-krY1NbFilUHn6ePMRX4+EddsIu33Y7W8Wt5bIeB6wRE=";
|
||||
};
|
||||
|
||||
depsExtraArgs = {
|
||||
postBuild = let
|
||||
mimallocPatch = (fetchpatch {
|
||||
name = "mimalloc-older-macos-fixes.patch";
|
||||
url = "https://github.com/microsoft/mimalloc/commit/40e0507a5959ee218f308d33aec212c3ebeef3bb.patch";
|
||||
stripLen = 1;
|
||||
extraPrefix = "libmimalloc-sys/c_src/mimalloc/";
|
||||
sha256 = "1cqgay6ayzxsj8v1dy8405kwd8av34m4bjc84iyg9r52amlijbg4";
|
||||
});
|
||||
in ''
|
||||
pushd $name
|
||||
patch -p1 < ${mimallocPatch}
|
||||
substituteInPlace libmimalloc-sys/.cargo-checksum.json \
|
||||
--replace \
|
||||
'6a2e9f0db0d3de160f9f15ddc8a870dbc42bba724f19f1e69b8c4952cb36821a' \
|
||||
'201ab8874d9ba863406e084888e492b785a7edae00a222f395c079028d21a89a' \
|
||||
--replace \
|
||||
'a87a27e8432a63e5de25703ff5025588afd458e3a573e51b3c3dee2281bff0d4' \
|
||||
'ab98a2da81d2145003a9cba7b7025efbd2c7b37c7a23c058c150705a3ec39298'
|
||||
popd
|
||||
'';
|
||||
};
|
||||
cargoSha256 = "sha256-nE6sl8n12fHLWH/tEXZhDjVBxGDoLyFDtVC5GFNClzM=";
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = difftastic; };
|
||||
|
||||
meta = with lib; {
|
||||
description = "A syntax-aware diff";
|
||||
homepage = "https://github.com/Wilfred/difftastic";
|
||||
changelog = "https://github.com/Wilfred/difftastic/raw/${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ethancedwards8 figsoda ];
|
||||
mainProgram = "difft";
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/text/diffutils/default.nix
Normal file
35
pkgs/tools/text/diffutils/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, xz, coreutils ? null }:
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||
# files.
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "diffutils";
|
||||
version = "3.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/diffutils/diffutils-${version}.tar.xz";
|
||||
sha256 = "sha256-pr3X0bMSZtEcT03mwbdI1GB6sCMa9RiPwlM9CuJDj+w=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
nativeBuildInputs = [ xz.bin ];
|
||||
/* If no explicit coreutils is given, use the one from stdenv. */
|
||||
buildInputs = [ coreutils ];
|
||||
|
||||
configureFlags =
|
||||
# "pr" need not be on the PATH as a run-time dep, so we need to tell
|
||||
# configure where it is. Covers the cross and native case alike.
|
||||
lib.optional (coreutils != null) "PR_PROGRAM=${coreutils}/bin/pr"
|
||||
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "gl_cv_func_getopt_gnu=yes";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/diffutils/diffutils.html";
|
||||
description = "Commands for showing the differences between files (diff, cmp, etc.)";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
59
pkgs/tools/text/dirdiff/default.nix
Normal file
59
pkgs/tools/text/dirdiff/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ copyDesktopItems, fetchurl, lib, makeDesktopItem, stdenv, tcl, tk }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dirdiff";
|
||||
version = "2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://samba/paulus/${pname}-${version}.tar.gz";
|
||||
sha256 = "0lljd8av68j70733yshzzhxjr1lm0vgmbqsm8f02g03qsma3cdyb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ copyDesktopItems ];
|
||||
buildInputs = [ tcl tk ];
|
||||
|
||||
# Some light path patching.
|
||||
patches = [ ./dirdiff-2.1-vars.patch ];
|
||||
postPatch = ''
|
||||
for file in dirdiff Makefile; do
|
||||
substituteInPlace "$file" \
|
||||
--subst-var out \
|
||||
--subst-var-by tcl ${tcl} \
|
||||
--subst-var-by tk ${tk}
|
||||
done
|
||||
'';
|
||||
|
||||
# If we don't create the directories ourselves, then 'make install' creates
|
||||
# files named 'bin' and 'lib'.
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin $out/lib
|
||||
'';
|
||||
|
||||
installFlags = [
|
||||
"BINDIR=${placeholder "out"}/bin"
|
||||
"LIBDIR=${placeholder "out"}/lib"
|
||||
];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "dirdiff";
|
||||
exec = "dirdiff";
|
||||
desktopName = "Dirdiff";
|
||||
genericName = "Directory Diff Viewer";
|
||||
comment = "Diff and merge directory trees";
|
||||
categories = [ "Development" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Graphical directory tree diff and merge tool";
|
||||
longDescription = ''
|
||||
Dirdiff is a graphical tool for displaying the differences between
|
||||
directory trees and for merging changes from one tree into another.
|
||||
'';
|
||||
homepage = "https://www.samba.org/ftp/paulus/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ khumba ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/text/dirdiff/dirdiff-2.1-vars.patch
Normal file
32
pkgs/tools/text/dirdiff/dirdiff-2.1-vars.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
diff '--color=auto' -ru dirdiff-2.1/dirdiff dirdiff-2.1-patched/dirdiff
|
||||
--- dirdiff-2.1/dirdiff 2005-04-20 03:09:53.000000000 -0700
|
||||
+++ dirdiff-2.1-patched/dirdiff 2021-02-14 22:54:09.837692023 -0800
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Tcl ignores the next line \
|
||||
-exec wish "$0" -- "${1+$@}"
|
||||
+exec @tk@/bin/wish "$0" -- "${1+$@}"
|
||||
|
||||
# Copyright (C) 1999-2004 Paul Mackerras. All rights reserved.
|
||||
# This program is free software; it may be used, copied, modified
|
||||
@@ -17,7 +17,7 @@
|
||||
set TclExe [info nameofexecutable]
|
||||
set compound_ok [expr {$tcl_version >= 8.4}]
|
||||
|
||||
-set nofilecmp [catch {load libfilecmp.so.0.0}]
|
||||
+set nofilecmp [catch {load @out@/lib/libfilecmp.so.0.0}]
|
||||
set rcsflag {}
|
||||
set diffbflag {}
|
||||
set diffBflag {}
|
||||
diff '--color=auto' -ru dirdiff-2.1/Makefile dirdiff-2.1-patched/Makefile
|
||||
--- dirdiff-2.1/Makefile 2005-04-19 03:22:01.000000000 -0700
|
||||
+++ dirdiff-2.1-patched/Makefile 2021-02-14 22:54:58.575400923 -0800
|
||||
@@ -7,7 +7,7 @@
|
||||
INSTALL=install
|
||||
|
||||
# You may need to change the -I arguments depending on your system
|
||||
-CFLAGS=-O3 -I/usr/include/tcl8.3/ -I/usr/include/tcl
|
||||
+CFLAGS=-O3 -I@tcl@/include
|
||||
|
||||
all: libfilecmp.so.0.0
|
||||
|
||||
40
pkgs/tools/text/discount/default.nix
Normal file
40
pkgs/tools/text/discount/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.2.7b";
|
||||
pname = "discount";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Orc";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-S6OVKYulhvEPRqNXBsvZ7m2W4cbdnrpZKPAo3SfD+9s=";
|
||||
};
|
||||
|
||||
patches = [ ./fix-configure-path.patch ];
|
||||
configureScript = "./configure.sh";
|
||||
configureFlags = [
|
||||
"--shared"
|
||||
"--debian-glitch" # use deterministic mangling
|
||||
"--pkg-config"
|
||||
"--h1-title"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
installTargets = [ "install.everything" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postFixup = lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -id $out/lib/libmarkdown.dylib $out/lib/libmarkdown.dylib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Implementation of Markdown markup language in C";
|
||||
homepage = "http://www.pell.portland.or.us/~orc/Code/discount/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ shell ];
|
||||
mainProgram = "markdown";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
12
pkgs/tools/text/discount/fix-configure-path.patch
Normal file
12
pkgs/tools/text/discount/fix-configure-path.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -rupN discount-2.1.6-original/configure.inc discount-2.1.6/configure.inc
|
||||
--- discount-2.1.6-original/configure.inc 2014-10-10 15:34:24.158325345 +0100
|
||||
+++ discount-2.1.6/configure.inc 2014-10-10 15:34:33.553325321 +0100
|
||||
@@ -32,7 +32,7 @@
|
||||
# this preamble code is executed when this file is sourced and it picks
|
||||
# interesting things off the command line.
|
||||
#
|
||||
-ac_default_path="/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
|
||||
+ac_default_path=$PATH
|
||||
|
||||
ac_standard="--src=DIR where the source lives (.)
|
||||
--prefix=DIR where to install the final product (/usr/local)
|
||||
23
pkgs/tools/text/dos2unix/default.nix
Normal file
23
pkgs/tools/text/dos2unix/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{lib, stdenv, fetchurl, perl, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dos2unix";
|
||||
version = "7.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://waterlan.home.xs4all.nl/dos2unix/${pname}-${version}.tar.gz";
|
||||
sha256 = "00dfsf4rfyjb5j12gan8xjiirm0asshdz6dmd3l34a7ays6wadb0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ perl gettext ];
|
||||
makeFlags = [ "prefix=${placeholder "out"}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert text files with DOS or Mac line breaks to Unix line breaks and vice versa";
|
||||
homepage = "https://waterlan.home.xs4all.nl/dos2unix.html";
|
||||
changelog = "https://sourceforge.net/p/dos2unix/dos2unix/ci/dos2unix-${version}/tree/dos2unix/NEWS.txt?format=raw";
|
||||
license = licenses.bsd2;
|
||||
maintainers = with maintainers; [ c0bw3b ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/text/each/default.nix
Normal file
25
pkgs/tools/text/each/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "each";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arraypad";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-5Aa/uHWrU4bpWd28Uddnuhmi6guHy09W9AU8sAfea6I=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-sH9rraPNAIlW2KQVaZfYa10c1HHQpDgedY1+9e94RLE=";
|
||||
|
||||
meta = with lib; {
|
||||
description = " A better way of working with structured data on the command line";
|
||||
homepage = "https://github.com/arraypad/each";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ thiagokokada ];
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/text/ebook-tools/default.nix
Normal file
27
pkgs/tools/text/ebook-tools/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl, cmake, pkg-config, libxml2, libzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ebook-tools";
|
||||
version = "0.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ebook-tools/ebook-tools-${version}.tar.gz";
|
||||
sha256 = "1bi7wsz3p5slb43kj7lgb3r6lb91lvb6ldi556k4y50ix6b5khyb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libxml2 libzip ];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config --cflags libzip)"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://ebook-tools.sourceforge.net";
|
||||
description = "Tools and library for dealing with various ebook file formats";
|
||||
maintainers = [ ];
|
||||
platforms = platforms.all;
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/text/enca/default.nix
Normal file
28
pkgs/tools/text/enca/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, libiconv, recode }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "enca";
|
||||
version = "1.19";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.cihar.com/enca/${pname}-${version}.tar.xz";
|
||||
sha256 = "1f78jmrggv3jymql8imm5m9yc8nqjw5l99mpwki2245l8357wj1s";
|
||||
};
|
||||
|
||||
buildInputs = [ recode libiconv ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Detects the encoding of text files and reencodes them";
|
||||
|
||||
longDescription = ''
|
||||
Enca detects the encoding of text files, on the basis of knowledge
|
||||
of their language. It can also convert them to other encodings,
|
||||
allowing you to recode files without knowing their current encoding.
|
||||
It supports most of Central and East European languages, and a few
|
||||
Unicode variants, independently on language.
|
||||
'';
|
||||
|
||||
license = licenses.gpl2;
|
||||
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/text/enscript/default.nix
Normal file
44
pkgs/tools/text/enscript/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "enscript";
|
||||
version = "1.6.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/enscript/enscript-${version}.tar.gz";
|
||||
sha256 = "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd";
|
||||
};
|
||||
|
||||
preBuild =
|
||||
''
|
||||
# Fix building on Darwin with GCC.
|
||||
substituteInPlace compat/regex.c --replace \
|
||||
__private_extern__ '__attribute__ ((visibility ("hidden")))'
|
||||
'';
|
||||
|
||||
buildInputs = [ gettext ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Converter from ASCII to PostScript, HTML, or RTF";
|
||||
|
||||
longDescription =
|
||||
'' GNU Enscript converts ASCII files to PostScript, HTML, or RTF and
|
||||
stores generated output to a file or sends it directly to the
|
||||
printer. It includes features for `pretty-printing'
|
||||
(language-sensitive code highlighting) in several programming
|
||||
languages.
|
||||
|
||||
Enscript can be easily extended to handle different output media and
|
||||
it has many options that can be used to customize printouts.
|
||||
'';
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
homepage = "https://www.gnu.org/software/enscript/";
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/text/epubcheck/default.nix
Normal file
42
pkgs/tools/text/epubcheck/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchzip
|
||||
, jre, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "epubcheck";
|
||||
version = "4.2.6";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/w3c/epubcheck/releases/download/v${version}/epubcheck-${version}.zip";
|
||||
sha256 = "sha256-f4r0ODKvZrl+YBcP2T9Z+zEuCyvQm9W7GNiLTr4p278=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -r lib/* $out/lib
|
||||
|
||||
mkdir -p $out/libexec/epubcheck
|
||||
cp epubcheck.jar $out/libexec/epubcheck
|
||||
|
||||
classpath=$out/libexec/epubcheck/epubcheck.jar
|
||||
for jar in $out/lib/*.jar; do
|
||||
classpath="$classpath:$jar"
|
||||
done
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${jre}/bin/java $out/bin/epubcheck \
|
||||
--add-flags "-classpath $classpath com.adobe.epubcheck.tool.Checker"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/w3c/epubcheck";
|
||||
description = "Validation tool for EPUB";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = with licenses; [ asl20 bsd3 mpl10 w3c ];
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ eadwu ];
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/text/esh/default.nix
Normal file
40
pkgs/tools/text/esh/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchFromGitHub, asciidoctor, gawk, gnused, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "esh";
|
||||
version = "0.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jirutka";
|
||||
repo = "esh";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ddaji5nplf1dyvgkrhqjy8m5djaycqcfhjv30yprj1avjymlj6w";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ asciidoctor ];
|
||||
|
||||
buildInputs = [ gawk gnused ];
|
||||
|
||||
makeFlags = [ "prefix=$(out)" "DESTDIR=" ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
substituteInPlace esh \
|
||||
--replace '"/bin/sh"' '"${runtimeShell}"' \
|
||||
--replace '"awk"' '"${gawk}/bin/awk"' \
|
||||
--replace 'sed' '${gnused}/bin/sed'
|
||||
substituteInPlace tests/test-dump.exp \
|
||||
--replace '#!/bin/sh' '#!${runtimeShell}'
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple templating engine based on shell";
|
||||
homepage = "https://github.com/jirutka/esh";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mnacamura ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/text/fanficfare/default.nix
Normal file
30
pkgs/tools/text/fanficfare/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "FanFicFare";
|
||||
version = "4.8.0";
|
||||
|
||||
src = python3Packages.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0h20cw9z6k3z42fhl48pfxcqrk3i45zp4f4xm6pz7jqjzi17h9fk";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
beautifulsoup4
|
||||
chardet
|
||||
cloudscraper
|
||||
html5lib
|
||||
html2text
|
||||
requests-file
|
||||
];
|
||||
|
||||
doCheck = false; # no tests exist
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool for making eBooks from fanfiction web sites";
|
||||
homepage = "https://github.com/JimmXinu/FanFicFare";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ dwarfmaster ];
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/text/fastmod/default.nix
Normal file
29
pkgs/tools/text/fastmod/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, libiconv
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "fastmod";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebookincubator";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Lv8hARD/aVWiWpJQmPWPeACpX15+3NogoUl5yh63E7A=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-L1MKoVacVKcpEG2IfS+eENxFZNiSaTDTxfFbFlvzYl8=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A utility that makes sweeping changes to large, shared code bases";
|
||||
homepage = "https://github.com/facebookincubator/fastmod";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jduan ];
|
||||
};
|
||||
}
|
||||
22
pkgs/tools/text/frangipanni/default.nix
Normal file
22
pkgs/tools/text/frangipanni/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "frangipanni";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "birchb1024";
|
||||
repo = "frangipanni";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-jIXyqwZWfCBSDTTodHTct4V5rjYv7h4Vcw7cXOFk17w=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-TSN5M/UCTtfoTf1hDCfrJMCFdSwL/NVXssgt4aefom8=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert lines of text into a tree structure";
|
||||
homepage = "https://github.com/birchb1024/frangipanni";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ siraben ];
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/text/fst/default.nix
Normal file
38
pkgs/tools/text/fst/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchCrate
|
||||
, stdenv
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "fst";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit version;
|
||||
crateName = "fst-bin";
|
||||
sha256 = "sha256-m9JDVHy+o4RYLGkYnhOpTuLyJjXtOwwl2SQpzRuz1m0=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-RMjNk8tE7AYBYgys4IjCCfgPdDgwbYVmrWpWNBOf70E=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
csv="$(mktemp)"
|
||||
fst="$(mktemp)"
|
||||
printf "abc,1\nabcd,1" > "$csv"
|
||||
$out/bin/fst map "$csv" "$fst" --force
|
||||
$out/bin/fst fuzzy "$fst" 'abc'
|
||||
$out/bin/fst --help > /dev/null
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Represent large sets and maps compactly with finite state transducers";
|
||||
homepage = "https://github.com/BurntSushi/fst";
|
||||
license = with licenses; [ unlicense /* or */ mit ];
|
||||
maintainers = with maintainers; [ rmcgibbo ];
|
||||
};
|
||||
}
|
||||
77
pkgs/tools/text/gawk/default.nix
Normal file
77
pkgs/tools/text/gawk/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
# TODO: links -lsigsegv but loses the reference for some reason
|
||||
, withSigsegv ? (false && stdenv.hostPlatform.system != "x86_64-cygwin"), libsigsegv
|
||||
, interactive ? false, readline
|
||||
|
||||
/* Test suite broke on:
|
||||
stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1
|
||||
|| stdenv.isDarwin # XXX: `locale' segfaults
|
||||
|| stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff?
|
||||
|| stdenv.isFreeBSD
|
||||
*/
|
||||
, doCheck ? (interactive && stdenv.isLinux), glibcLocales ? null
|
||||
, locale ? null
|
||||
}:
|
||||
|
||||
assert (doCheck && stdenv.isLinux) -> glibcLocales != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gawk" + lib.optionalString interactive "-interactive";
|
||||
version = "5.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gawk/gawk-${version}.tar.xz";
|
||||
sha256 = "18kybw47fb1sdagav7aj95r9pp09r5gm202y3ahvwjw9dqw2jxnq";
|
||||
};
|
||||
|
||||
# When we do build separate interactive version, it makes sense to always include man.
|
||||
outputs = [ "out" "info" ]
|
||||
++ lib.optional (!interactive) "man";
|
||||
|
||||
nativeBuildInputs = lib.optional (doCheck && stdenv.isLinux) glibcLocales;
|
||||
|
||||
buildInputs = lib.optional withSigsegv libsigsegv
|
||||
++ lib.optional interactive readline
|
||||
++ lib.optional stdenv.isDarwin locale;
|
||||
|
||||
configureFlags = [
|
||||
(if withSigsegv then "--with-libsigsegv-prefix=${libsigsegv}" else "--without-libsigsegv")
|
||||
(if interactive then "--with-readline=${readline.dev}" else "--without-readline")
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"AR=${stdenv.cc.targetPrefix}ar"
|
||||
];
|
||||
|
||||
inherit doCheck;
|
||||
|
||||
postInstall = ''
|
||||
rm "$out"/bin/gawk-*
|
||||
ln -s gawk.1 "''${!outputMan}"/share/man/man1/awk.1
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
libsigsegv = if withSigsegv then libsigsegv else null; # for stdenv bootstrap
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/gawk/";
|
||||
description = "GNU implementation of the Awk programming language";
|
||||
longDescription = ''
|
||||
Many computer users need to manipulate text files: extract and then
|
||||
operate on data from parts of certain lines while discarding the rest,
|
||||
make changes in various text files wherever certain patterns appear,
|
||||
and so on. To write a program to do these things in a language such as
|
||||
C or Pascal is a time-consuming inconvenience that may take many lines
|
||||
of code. The job is easy with awk, especially the GNU implementation:
|
||||
Gawk.
|
||||
|
||||
The awk utility interprets a special-purpose programming language that
|
||||
makes it possible to handle many data-reformatting jobs with just a few
|
||||
lines of code.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix ++ platforms.windows;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
13
pkgs/tools/text/gawk/gawk-with-extensions.nix
Normal file
13
pkgs/tools/text/gawk/gawk-with-extensions.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ runCommand, gawk, extensions, makeWrapper }:
|
||||
|
||||
runCommand "gawk-with-extensions" {
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ gawk ] ++ extensions;
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
for i in ${gawk}/bin/*; do
|
||||
name="$(basename "$i")"
|
||||
makeWrapper $i $out/bin/$name \
|
||||
--prefix AWKLIBPATH : "${gawk}/lib/gawk:''${AWKLIBPATH:-}"
|
||||
done
|
||||
''
|
||||
149
pkgs/tools/text/gawk/gawkextlib.nix
Normal file
149
pkgs/tools/text/gawk/gawkextlib.nix
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
{ lib, stdenv, recurseIntoAttrs, fetchgit, writeText, pkg-config, autoreconfHook
|
||||
, autoconf, automake, libiconv, libtool, texinfo, gettext, gawk, rapidjson, gd
|
||||
, shapelib, libharu, lmdb, gmp, glibcLocales, mpfr, more, postgresql, hiredis
|
||||
, expat, tre, makeWrapper }:
|
||||
|
||||
let
|
||||
buildExtension = lib.makeOverridable
|
||||
({ name, gawkextlib, extraBuildInputs ? [ ], doCheck ? true }:
|
||||
let is_extension = !isNull gawkextlib;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "gawkextlib-${name}";
|
||||
version = "unstable-2019-11-21";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.code.sf.net/p/gawkextlib/code";
|
||||
rev = "f70f10da2804e4fd0a0bac57736e9c1cf21e345d";
|
||||
sha256 = "0r8fz89n3l4dfszs1980yqj0ah95430lj0y1lb7blfkwxa6c2xik";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
cd ${name}
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
texinfo
|
||||
gettext
|
||||
];
|
||||
|
||||
buildInputs = [ gawk ] ++ extraBuildInputs;
|
||||
propagatedBuildInputs = lib.optional is_extension gawkextlib;
|
||||
|
||||
setupHook = if is_extension then ./setup-hook.sh else null;
|
||||
inherit gawk;
|
||||
|
||||
inherit doCheck;
|
||||
checkInputs = [ more ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://sourceforge.net/projects/gawkextlib/";
|
||||
description = "Dynamically loaded extension libraries for GNU AWK";
|
||||
longDescription = ''
|
||||
The gawkextlib project provides several extension libraries for
|
||||
gawk (GNU AWK), as well as libgawkextlib containing some APIs that
|
||||
are useful for building gawk extension libraries. These libraries
|
||||
enable gawk to process XML data, interact with a PostgreSQL
|
||||
database, use the GD graphics library, and perform unlimited
|
||||
precision MPFR calculations.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ tomberek ];
|
||||
};
|
||||
});
|
||||
gawkextlib = buildExtension {
|
||||
gawkextlib = null;
|
||||
name = "lib";
|
||||
};
|
||||
libs = {
|
||||
abort = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "abort";
|
||||
};
|
||||
aregex = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "aregex";
|
||||
extraBuildInputs = [ tre ];
|
||||
};
|
||||
csv = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "csv";
|
||||
};
|
||||
errno = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "errno";
|
||||
};
|
||||
gd = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "gd";
|
||||
extraBuildInputs = [ gd ];
|
||||
};
|
||||
haru = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "haru";
|
||||
extraBuildInputs = [ libharu ];
|
||||
};
|
||||
json = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "json";
|
||||
extraBuildInputs = [ rapidjson ];
|
||||
};
|
||||
lmdb = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "lmdb";
|
||||
extraBuildInputs = [ lmdb ];
|
||||
# mdb_env_open(env, /dev/null)
|
||||
#! No such device
|
||||
# mdb_env_open(env, /dev/null)
|
||||
#! Operation not supported by device
|
||||
doCheck = !stdenv.isDarwin;
|
||||
};
|
||||
mbs = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "mbs";
|
||||
extraBuildInputs = [ glibcLocales ];
|
||||
#! "spät": length: 5, mbs_length: 6, wcswidth: 4
|
||||
doCheck = !stdenv.isDarwin;
|
||||
};
|
||||
mpfr = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "mpfr";
|
||||
extraBuildInputs = [ gmp mpfr ];
|
||||
};
|
||||
nl_langinfo = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "nl_langinfo";
|
||||
};
|
||||
pgsql = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "pgsql";
|
||||
extraBuildInputs = [ postgresql ];
|
||||
};
|
||||
redis = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "redis";
|
||||
extraBuildInputs = [ hiredis ];
|
||||
};
|
||||
select = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "select";
|
||||
};
|
||||
timex = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "timex";
|
||||
};
|
||||
xml = buildExtension {
|
||||
inherit gawkextlib;
|
||||
name = "xml";
|
||||
extraBuildInputs = [ expat libiconv ];
|
||||
};
|
||||
};
|
||||
in recurseIntoAttrs (libs // {
|
||||
inherit gawkextlib buildExtension;
|
||||
full = builtins.attrValues libs;
|
||||
})
|
||||
6
pkgs/tools/text/gawk/setup-hook.sh
Normal file
6
pkgs/tools/text/gawk/setup-hook.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
local oldOpts="-u"
|
||||
shopt -qo nounset || oldOpts="+u"
|
||||
set +u
|
||||
. @gawk@/etc/profile.d/gawk.sh
|
||||
gawklibpath_append @out@/lib/gawk
|
||||
set "$oldOpts"
|
||||
17
pkgs/tools/text/gist/default.nix
Normal file
17
pkgs/tools/text/gist/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ buildRubyGem, lib, ruby }:
|
||||
|
||||
buildRubyGem rec {
|
||||
inherit ruby;
|
||||
name = "${gemName}-${version}";
|
||||
gemName = "gist";
|
||||
version = "6.0.0";
|
||||
source.sha256 = "0qnd1jqd7b04871v4l73grcmi7c0pivm8nsfrqvwivm4n4b3c2hd";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Upload code to https://gist.github.com (or github enterprise)";
|
||||
homepage = "http://defunkt.io/gist/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ zimbatm ];
|
||||
platforms = ruby.meta.platforms;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/text/gjo/default.nix
Normal file
25
pkgs/tools/text/gjo/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gjo";
|
||||
version = "1.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "skanehira";
|
||||
repo = "gjo";
|
||||
rev = version;
|
||||
sha256 = "07halr0jzds4rya6hlvp45bjf7vg4yf49w5q60mch05hk8qkjjdw";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Small utility to create JSON objects";
|
||||
homepage = "https://github.com/skanehira/gjo";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/text/glogg/default.nix
Normal file
40
pkgs/tools/text/glogg/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ mkDerivation, lib, stdenv, fetchFromGitHub, qmake, boost }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "glogg";
|
||||
version = "1.1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nickbnf";
|
||||
repo = "glogg";
|
||||
rev = "v${version}";
|
||||
sha256 = "0hf1c2m8n88frmxmyn0ndr8129p7iky49nq565sw1asaydm5z6pb";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace glogg.pro \
|
||||
--replace "boost_program_options-mt" "boost_program_options"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ qmake ];
|
||||
buildInputs = [ boost ];
|
||||
|
||||
qmakeFlags = [ "VERSION=${version}" ];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p $out/Applications
|
||||
mv $out/bin/glogg.app $out/Applications/glogg.app
|
||||
rm -fr $out/{bin,share}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The fast, smart log explorer";
|
||||
longDescription = ''
|
||||
A multi-platform GUI application to browse and search through long or complex log files. It is designed with programmers and system administrators in mind. glogg can be seen as a graphical, interactive combination of grep and less.
|
||||
'';
|
||||
homepage = "https://glogg.bonnefon.org/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ c0bw3b ];
|
||||
};
|
||||
}
|
||||
70
pkgs/tools/text/gnugrep/default.nix
Normal file
70
pkgs/tools/text/gnugrep/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ lib, stdenv, fetchurl, pcre, libiconv, perl }:
|
||||
|
||||
# Note: this package is used for bootstrapping fetchurl, and thus
|
||||
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
||||
# cgit) that are needed here should be included directly in Nixpkgs as
|
||||
# files.
|
||||
|
||||
let version = "3.7"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gnugrep";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/grep/grep-${version}.tar.xz";
|
||||
sha256 = "0g42svbc1nq5bamxfj6x7320wli4dlj86padk0hwgbk04hqxl42w";
|
||||
};
|
||||
|
||||
# Perl is needed for testing
|
||||
nativeBuildInputs = [ perl ];
|
||||
outputs = [ "out" "info" ]; # the man pages are rather small
|
||||
|
||||
buildInputs = [ pcre libiconv ];
|
||||
|
||||
# cygwin: FAIL: multibyte-white-space
|
||||
# freebsd: FAIL mb-non-UTF8-performance
|
||||
# all platforms: timing sensitivity in long-pattern-perf
|
||||
#doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin && !stdenv.isFreeBSD;
|
||||
doCheck = false;
|
||||
|
||||
# On macOS, force use of mkdir -p, since Grep's fallback
|
||||
# (./install-sh) is broken.
|
||||
preConfigure = ''
|
||||
export MKDIR_P="mkdir -p"
|
||||
'';
|
||||
|
||||
# Fix reference to sh in bootstrap-tools, and invoke grep via
|
||||
# absolute path rather than looking at argv[0].
|
||||
postInstall =
|
||||
''
|
||||
rm $out/bin/egrep $out/bin/fgrep
|
||||
echo "#! /bin/sh" > $out/bin/egrep
|
||||
echo "exec $out/bin/grep -E \"\$@\"" >> $out/bin/egrep
|
||||
echo "#! /bin/sh" > $out/bin/fgrep
|
||||
echo "exec $out/bin/grep -F \"\$@\"" >> $out/bin/fgrep
|
||||
chmod +x $out/bin/egrep $out/bin/fgrep
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/grep/";
|
||||
description = "GNU implementation of the Unix grep command";
|
||||
|
||||
longDescription = ''
|
||||
The grep command searches one or more input files for lines
|
||||
containing a match to a specified pattern. By default, grep
|
||||
prints the matching lines.
|
||||
'';
|
||||
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
maintainers = [
|
||||
maintainers.eelco
|
||||
maintainers.m00wl
|
||||
];
|
||||
platforms = platforms.all;
|
||||
mainProgram = "grep";
|
||||
};
|
||||
|
||||
passthru = {inherit pcre;};
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||
Date: Fri, 6 Apr 2018 11:34:51 +0200
|
||||
Subject: Allow input files to be missing for ed-style patches
|
||||
|
||||
* src/pch.c (do_ed_script): Allow input files to be missing so that new
|
||||
files will be created as with non-ed-style patches.
|
||||
---
|
||||
src/pch.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/pch.c b/src/pch.c
|
||||
index bc6278c..0c5cc26 100644
|
||||
--- a/src/pch.c
|
||||
+++ b/src/pch.c
|
||||
@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
|
||||
|
||||
if (! dry_run && ! skip_rest_of_patch) {
|
||||
int exclusive = *outname_needs_removal ? 0 : O_EXCL;
|
||||
- assert (! inerrno);
|
||||
- *outname_needs_removal = true;
|
||||
- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
|
||||
+ if (inerrno != ENOENT)
|
||||
+ {
|
||||
+ *outname_needs_removal = true;
|
||||
+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
|
||||
+ }
|
||||
sprintf (buf, "%s %s%s", editor_program,
|
||||
verbosity == VERBOSE ? "" : "- ",
|
||||
outname);
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
||||
211
pkgs/tools/text/gnupatch/CVE-2018-1000156.patch
Normal file
211
pkgs/tools/text/gnupatch/CVE-2018-1000156.patch
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||
Date: Fri, 6 Apr 2018 12:14:49 +0200
|
||||
Subject: Fix arbitrary command execution in ed-style patches
|
||||
(CVE-2018-1000156)
|
||||
|
||||
* src/pch.c (do_ed_script): Write ed script to a temporary file instead
|
||||
of piping it to ed: this will cause ed to abort on invalid commands
|
||||
instead of rejecting them and carrying on.
|
||||
* tests/ed-style: New test case.
|
||||
* tests/Makefile.am (TESTS): Add test case.
|
||||
---
|
||||
src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++---------------
|
||||
tests/Makefile.am | 1 +
|
||||
tests/ed-style | 41 +++++++++++++++++++++++++
|
||||
3 files changed, 108 insertions(+), 25 deletions(-)
|
||||
create mode 100644 tests/ed-style
|
||||
|
||||
diff --git a/src/pch.c b/src/pch.c
|
||||
index 0c5cc26..4fd5a05 100644
|
||||
--- a/src/pch.c
|
||||
+++ b/src/pch.c
|
||||
@@ -33,6 +33,7 @@
|
||||
# include <io.h>
|
||||
#endif
|
||||
#include <safe.h>
|
||||
+#include <sys/wait.h>
|
||||
|
||||
#define INITHUNKMAX 125 /* initial dynamic allocation size */
|
||||
|
||||
@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
|
||||
static char const editor_program[] = EDITOR_PROGRAM;
|
||||
|
||||
file_offset beginning_of_this_line;
|
||||
- FILE *pipefp = 0;
|
||||
size_t chars_read;
|
||||
+ FILE *tmpfp = 0;
|
||||
+ char const *tmpname;
|
||||
+ int tmpfd;
|
||||
+ pid_t pid;
|
||||
+
|
||||
+ if (! dry_run && ! skip_rest_of_patch)
|
||||
+ {
|
||||
+ /* Write ed script to a temporary file. This causes ed to abort on
|
||||
+ invalid commands such as when line numbers or ranges exceed the
|
||||
+ number of available lines. When ed reads from a pipe, it rejects
|
||||
+ invalid commands and treats the next line as a new command, which
|
||||
+ can lead to arbitrary command execution. */
|
||||
+
|
||||
+ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
|
||||
+ if (tmpfd == -1)
|
||||
+ pfatal ("Can't create temporary file %s", quotearg (tmpname));
|
||||
+ tmpfp = fdopen (tmpfd, "w+b");
|
||||
+ if (! tmpfp)
|
||||
+ pfatal ("Can't open stream for file %s", quotearg (tmpname));
|
||||
+ }
|
||||
|
||||
- if (! dry_run && ! skip_rest_of_patch) {
|
||||
- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
|
||||
- if (inerrno != ENOENT)
|
||||
- {
|
||||
- *outname_needs_removal = true;
|
||||
- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
|
||||
- }
|
||||
- sprintf (buf, "%s %s%s", editor_program,
|
||||
- verbosity == VERBOSE ? "" : "- ",
|
||||
- outname);
|
||||
- fflush (stdout);
|
||||
- pipefp = popen(buf, binary_transput ? "wb" : "w");
|
||||
- if (!pipefp)
|
||||
- pfatal ("Can't open pipe to %s", quotearg (buf));
|
||||
- }
|
||||
for (;;) {
|
||||
char ed_command_letter;
|
||||
beginning_of_this_line = file_tell (pfp);
|
||||
@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
|
||||
}
|
||||
ed_command_letter = get_ed_command_letter (buf);
|
||||
if (ed_command_letter) {
|
||||
- if (pipefp)
|
||||
- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
|
||||
+ if (tmpfp)
|
||||
+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
|
||||
write_fatal ();
|
||||
if (ed_command_letter != 'd' && ed_command_letter != 's') {
|
||||
p_pass_comments_through = true;
|
||||
while ((chars_read = get_line ()) != 0) {
|
||||
- if (pipefp)
|
||||
- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
|
||||
+ if (tmpfp)
|
||||
+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
|
||||
write_fatal ();
|
||||
if (chars_read == 2 && strEQ (buf, ".\n"))
|
||||
break;
|
||||
@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
|
||||
break;
|
||||
}
|
||||
}
|
||||
- if (!pipefp)
|
||||
+ if (!tmpfp)
|
||||
return;
|
||||
- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
|
||||
- || fflush (pipefp) != 0)
|
||||
+ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
|
||||
+ || fflush (tmpfp) != 0)
|
||||
write_fatal ();
|
||||
- if (pclose (pipefp) != 0)
|
||||
- fatal ("%s FAILED", editor_program);
|
||||
+
|
||||
+ if (lseek (tmpfd, 0, SEEK_SET) == -1)
|
||||
+ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
|
||||
+
|
||||
+ if (! dry_run && ! skip_rest_of_patch) {
|
||||
+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
|
||||
+ *outname_needs_removal = true;
|
||||
+ if (inerrno != ENOENT)
|
||||
+ {
|
||||
+ *outname_needs_removal = true;
|
||||
+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
|
||||
+ }
|
||||
+ sprintf (buf, "%s %s%s", editor_program,
|
||||
+ verbosity == VERBOSE ? "" : "- ",
|
||||
+ outname);
|
||||
+ fflush (stdout);
|
||||
+
|
||||
+ pid = fork();
|
||||
+ if (pid == -1)
|
||||
+ pfatal ("Can't fork");
|
||||
+ else if (pid == 0)
|
||||
+ {
|
||||
+ dup2 (tmpfd, 0);
|
||||
+ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
|
||||
+ _exit (2);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ int wstatus;
|
||||
+ if (waitpid (pid, &wstatus, 0) == -1
|
||||
+ || ! WIFEXITED (wstatus)
|
||||
+ || WEXITSTATUS (wstatus) != 0)
|
||||
+ fatal ("%s FAILED", editor_program);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ fclose (tmpfp);
|
||||
+ safe_unlink (tmpname);
|
||||
|
||||
if (ofp)
|
||||
{
|
||||
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
||||
index 6b6df63..16f8693 100644
|
||||
--- a/tests/Makefile.am
|
||||
+++ b/tests/Makefile.am
|
||||
@@ -32,6 +32,7 @@ TESTS = \
|
||||
crlf-handling \
|
||||
dash-o-append \
|
||||
deep-directories \
|
||||
+ ed-style \
|
||||
empty-files \
|
||||
false-match \
|
||||
fifo \
|
||||
diff --git a/tests/ed-style b/tests/ed-style
|
||||
new file mode 100644
|
||||
index 0000000..d8c0689
|
||||
--- /dev/null
|
||||
+++ b/tests/ed-style
|
||||
@@ -0,0 +1,41 @@
|
||||
+# Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
+#
|
||||
+# Copying and distribution of this file, with or without modification,
|
||||
+# in any medium, are permitted without royalty provided the copyright
|
||||
+# notice and this notice are preserved.
|
||||
+
|
||||
+. $srcdir/test-lib.sh
|
||||
+
|
||||
+require cat
|
||||
+use_local_patch
|
||||
+use_tmpdir
|
||||
+
|
||||
+# ==============================================================
|
||||
+
|
||||
+cat > ed1.diff <<EOF
|
||||
+0a
|
||||
+foo
|
||||
+.
|
||||
+EOF
|
||||
+
|
||||
+check 'patch -e foo -i ed1.diff' <<EOF
|
||||
+EOF
|
||||
+
|
||||
+check 'cat foo' <<EOF
|
||||
+foo
|
||||
+EOF
|
||||
+
|
||||
+cat > ed2.diff <<EOF
|
||||
+1337a
|
||||
+r !echo bar
|
||||
+,p
|
||||
+EOF
|
||||
+
|
||||
+check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
|
||||
+?
|
||||
+Status: 2
|
||||
+EOF
|
||||
+
|
||||
+check 'cat foo' <<EOF
|
||||
+foo
|
||||
+EOF
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
||||
28
pkgs/tools/text/gnupatch/CVE-2018-6951.patch
Normal file
28
pkgs/tools/text/gnupatch/CVE-2018-6951.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||
Date: Mon, 12 Feb 2018 16:48:24 +0100
|
||||
Subject: Fix segfault with mangled rename patch
|
||||
|
||||
http://savannah.gnu.org/bugs/?53132
|
||||
* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
|
||||
for renames and copies (fix the existing check).
|
||||
---
|
||||
src/pch.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pch.c b/src/pch.c
|
||||
index ff9ed2c..bc6278c 100644
|
||||
--- a/src/pch.c
|
||||
+++ b/src/pch.c
|
||||
@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
|
||||
if ((pch_rename () || pch_copy ())
|
||||
&& ! inname
|
||||
&& ! ((i == OLD || i == NEW) &&
|
||||
- p_name[! reverse] &&
|
||||
+ p_name[reverse] && p_name[! reverse] &&
|
||||
+ name_is_valid (p_name[reverse]) &&
|
||||
name_is_valid (p_name[! reverse])))
|
||||
{
|
||||
say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
28
pkgs/tools/text/gnupatch/CVE-2018-6952.patch
Normal file
28
pkgs/tools/text/gnupatch/CVE-2018-6952.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
From 9c986353e420ead6e706262bf204d6e03322c300 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||
Date: Fri, 17 Aug 2018 13:35:40 +0200
|
||||
Subject: Fix swapping fake lines in pch_swap
|
||||
|
||||
* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a
|
||||
blank line in the middle of a context-diff hunk: that empty line stays
|
||||
in the middle of the hunk and isn't swapped.
|
||||
|
||||
Fixes: https://savannah.gnu.org/bugs/index.php?53133
|
||||
---
|
||||
src/pch.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pch.c b/src/pch.c
|
||||
index e92bc64..a500ad9 100644
|
||||
--- a/src/pch.c
|
||||
+++ b/src/pch.c
|
||||
@@ -2122,7 +2122,7 @@ pch_swap (void)
|
||||
}
|
||||
if (p_efake >= 0) { /* fix non-freeable ptr range */
|
||||
if (p_efake <= i)
|
||||
- n = p_end - i + 1;
|
||||
+ n = p_end - p_ptrn_lines;
|
||||
else
|
||||
n = -i;
|
||||
p_efake += n;
|
||||
--
|
||||
108
pkgs/tools/text/gnupatch/CVE-2019-13636.patch
Normal file
108
pkgs/tools/text/gnupatch/CVE-2019-13636.patch
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||
Date: Mon, 15 Jul 2019 16:21:48 +0200
|
||||
Subject: Don't follow symlinks unless --follow-symlinks is given
|
||||
|
||||
* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
|
||||
append_to_file): Unless the --follow-symlinks option is given, open files with
|
||||
the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing
|
||||
that consistently for input files.
|
||||
* src/util.c (create_backup): When creating empty backup files, (re)create them
|
||||
with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
|
||||
---
|
||||
src/inp.c | 12 ++++++++++--
|
||||
src/util.c | 14 +++++++++++---
|
||||
2 files changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/inp.c b/src/inp.c
|
||||
index 32d0919..22d7473 100644
|
||||
--- a/src/inp.c
|
||||
+++ b/src/inp.c
|
||||
@@ -238,8 +238,13 @@ plan_a (char const *filename)
|
||||
{
|
||||
if (S_ISREG (instat.st_mode))
|
||||
{
|
||||
- int ifd = safe_open (filename, O_RDONLY|binary_transput, 0);
|
||||
+ int flags = O_RDONLY | binary_transput;
|
||||
size_t buffered = 0, n;
|
||||
+ int ifd;
|
||||
+
|
||||
+ if (! follow_symlinks)
|
||||
+ flags |= O_NOFOLLOW;
|
||||
+ ifd = safe_open (filename, flags, 0);
|
||||
if (ifd < 0)
|
||||
pfatal ("can't open file %s", quotearg (filename));
|
||||
|
||||
@@ -340,6 +345,7 @@ plan_a (char const *filename)
|
||||
static void
|
||||
plan_b (char const *filename)
|
||||
{
|
||||
+ int flags = O_RDONLY | binary_transput;
|
||||
int ifd;
|
||||
FILE *ifp;
|
||||
int c;
|
||||
@@ -353,7 +359,9 @@ plan_b (char const *filename)
|
||||
|
||||
if (instat.st_size == 0)
|
||||
filename = NULL_DEVICE;
|
||||
- if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0
|
||||
+ if (! follow_symlinks)
|
||||
+ flags |= O_NOFOLLOW;
|
||||
+ if ((ifd = safe_open (filename, flags, 0)) < 0
|
||||
|| ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r")))
|
||||
pfatal ("Can't open file %s", quotearg (filename));
|
||||
if (TMPINNAME_needs_removal)
|
||||
diff --git a/src/util.c b/src/util.c
|
||||
index 1cc08ba..fb38307 100644
|
||||
--- a/src/util.c
|
||||
+++ b/src/util.c
|
||||
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
|
||||
|
||||
try_makedirs_errno = ENOENT;
|
||||
safe_unlink (bakname);
|
||||
- while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0)
|
||||
+ while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0)
|
||||
{
|
||||
if (errno != try_makedirs_errno)
|
||||
pfatal ("Can't create file %s", quotearg (bakname));
|
||||
@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode,
|
||||
static void
|
||||
copy_to_fd (const char *from, int tofd)
|
||||
{
|
||||
+ int from_flags = O_RDONLY | O_BINARY;
|
||||
int fromfd;
|
||||
ssize_t i;
|
||||
|
||||
- if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0)
|
||||
+ if (! follow_symlinks)
|
||||
+ from_flags |= O_NOFOLLOW;
|
||||
+ if ((fromfd = safe_open (from, from_flags, 0)) < 0)
|
||||
pfatal ("Can't reopen file %s", quotearg (from));
|
||||
while ((i = read (fromfd, buf, bufsize)) != 0)
|
||||
{
|
||||
@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost,
|
||||
else
|
||||
{
|
||||
assert (S_ISREG (mode));
|
||||
+ if (! follow_symlinks)
|
||||
+ to_flags |= O_NOFOLLOW;
|
||||
tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode,
|
||||
to_dir_known_to_exist);
|
||||
copy_to_fd (from, tofd);
|
||||
@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost,
|
||||
void
|
||||
append_to_file (char const *from, char const *to)
|
||||
{
|
||||
+ int to_flags = O_WRONLY | O_APPEND | O_BINARY;
|
||||
int tofd;
|
||||
|
||||
- if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0)
|
||||
+ if (! follow_symlinks)
|
||||
+ to_flags |= O_NOFOLLOW;
|
||||
+ if ((tofd = safe_open (to, to_flags, 0)) < 0)
|
||||
pfatal ("Can't reopen file %s", quotearg (to));
|
||||
copy_to_fd (from, tofd);
|
||||
if (close (tofd) != 0)
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||
Date: Fri, 6 Apr 2018 19:36:15 +0200
|
||||
Subject: Invoke ed directly instead of using the shell
|
||||
|
||||
* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell
|
||||
command to avoid quoting vulnerabilities.
|
||||
---
|
||||
src/pch.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/pch.c b/src/pch.c
|
||||
index 4fd5a05..16e001a 100644
|
||||
--- a/src/pch.c
|
||||
+++ b/src/pch.c
|
||||
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname,
|
||||
*outname_needs_removal = true;
|
||||
copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
|
||||
}
|
||||
- sprintf (buf, "%s %s%s", editor_program,
|
||||
- verbosity == VERBOSE ? "" : "- ",
|
||||
- outname);
|
||||
fflush (stdout);
|
||||
|
||||
pid = fork();
|
||||
@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname,
|
||||
else if (pid == 0)
|
||||
{
|
||||
dup2 (tmpfd, 0);
|
||||
- execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
|
||||
+ assert (outname[0] != '!' && outname[0] != '-');
|
||||
+ execlp (editor_program, editor_program, "-", outname, (char *) NULL);
|
||||
_exit (2);
|
||||
}
|
||||
else
|
||||
--
|
||||
cgit v1.0-41-gc330
|
||||
|
||||
59
pkgs/tools/text/gnupatch/default.nix
Normal file
59
pkgs/tools/text/gnupatch/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
, ed, autoreconfHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "patch";
|
||||
version = "2.7.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/patch/patch-${version}.tar.xz";
|
||||
sha256 = "1zfqy4rdcy279vwn2z1kbv19dcfw25d2aqy9nzvdkq5bjzd0nqdc";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://git.savannah.gnu.org/cgit/patch.git/patch/?id=f290f48a621867084884bfff87f8093c15195e6a
|
||||
./CVE-2018-6951.patch
|
||||
|
||||
# https://git.savannah.gnu.org/cgit/patch.git/patch/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1
|
||||
./Allow_input_files_to_be_missing_for_ed-style_patches.patch
|
||||
|
||||
# https://git.savannah.gnu.org/cgit/patch.git/patch/?id=123eaff0d5d1aebe128295959435b9ca5909c26d
|
||||
./CVE-2018-1000156.patch
|
||||
|
||||
# https://git.savannah.gnu.org/cgit/patch.git/commit/?id=9c986353e420ead6e706262bf204d6e03322c300
|
||||
./CVE-2018-6952.patch
|
||||
|
||||
# https://git.savannah.gnu.org/cgit/patch.git/patch/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a
|
||||
./CVE-2019-13636.patch
|
||||
|
||||
# https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0
|
||||
./CVE-2019-13638-and-CVE-2018-20969.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"ac_cv_func_strnlen_working=yes"
|
||||
];
|
||||
|
||||
doCheck = stdenv.hostPlatform.libc != "musl"; # not cross;
|
||||
checkInputs = [ed];
|
||||
|
||||
meta = {
|
||||
description = "GNU Patch, a program to apply differences to files";
|
||||
|
||||
longDescription =
|
||||
'' GNU Patch takes a patch file containing a difference listing
|
||||
produced by the diff program and applies those differences to one or
|
||||
more original files, producing patched versions.
|
||||
'';
|
||||
|
||||
homepage = "https://savannah.gnu.org/projects/patch";
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
39
pkgs/tools/text/gnused/default.nix
Normal file
39
pkgs/tools/text/gnused/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchurl, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnused";
|
||||
version = "4.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/sed/sed-${version}.tar.xz";
|
||||
sha256 = "0cznxw73fzv1n3nj2zsq6nf73rvsbxndp444xkpahdqvlzz0r6zp";
|
||||
};
|
||||
|
||||
outputs = [ "out" "info" ];
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
preConfigure = "patchShebangs ./build-aux/help2man";
|
||||
|
||||
# Prevents attempts of running 'help2man' on cross-built binaries.
|
||||
PERL = if stdenv.hostPlatform == stdenv.buildPlatform then null else "missing";
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.gnu.org/software/sed/";
|
||||
description = "GNU sed, a batch stream editor";
|
||||
|
||||
longDescription = ''
|
||||
Sed (stream editor) isn't really a true text editor or text
|
||||
processor. Instead, it is used to filter text, i.e., it takes
|
||||
text input and performs some operation (or set of operations) on
|
||||
it and outputs the modified text. Sed is typically used for
|
||||
extracting part of a file using pattern matching or substituting
|
||||
multiple occurrences of a string within a file.
|
||||
'';
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ mic92 ];
|
||||
mainProgram = "sed";
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/text/goawk/default.nix
Normal file
36
pkgs/tools/text/goawk/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ buildGoModule, fetchFromGitHub, lib, stdenv }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "goawk";
|
||||
version = "1.18.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "benhoyt";
|
||||
repo = "goawk";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-kRakQo18qOzrlvsAKtKTHEacUxDfoWyMmtiM7d5WCvQ=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace goawk_test.go \
|
||||
--replace "TestCommandLine" "SkipCommandLine" \
|
||||
--replace "TestDevStdout" "SkipDevStdout" \
|
||||
--replace "TestFILENAME" "SkipFILENAME" \
|
||||
--replace "TestWildcards" "SkipWildcards"
|
||||
|
||||
substituteInPlace interp/interp_test.go \
|
||||
--replace "TestShellCommand" "SkipShellCommand"
|
||||
'';
|
||||
|
||||
doCheck = (stdenv.system != "aarch64-darwin");
|
||||
|
||||
meta = with lib; {
|
||||
description = "A POSIX-compliant AWK interpreter written in Go";
|
||||
homepage = "https://benhoyt.com/writings/goawk/";
|
||||
license = licenses.mit;
|
||||
mainProgram = "goawk";
|
||||
maintainers = with maintainers; [ abbe ];
|
||||
};
|
||||
}
|
||||
10
pkgs/tools/text/gpt2tc/0001-add-python-shebang.patch
Normal file
10
pkgs/tools/text/gpt2tc/0001-add-python-shebang.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
diff --git a/gpt2convert.py b/gpt2convert.py
|
||||
index 34ca909..6e6cac5 100644
|
||||
--- a/gpt2convert.py
|
||||
+++ b/gpt2convert.py
|
||||
@@ -1,3 +1,5 @@
|
||||
+#!/usr/bin/env python3
|
||||
+
|
||||
import sys
|
||||
import tensorflow as tf
|
||||
import numpy as np
|
||||
44
pkgs/tools/text/gpt2tc/default.nix
Normal file
44
pkgs/tools/text/gpt2tc/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl, autoPatchelfHook, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gpt2tc";
|
||||
version = "2021-04-24";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bellard.org/libnc/gpt2tc-${version}.tar.gz";
|
||||
hash = "sha256-kHnRziSNRewifM/oKDQwG27rXRvntuUUX8M+PUNHpA4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Add a shebang to the python script so that nix detects it as such and
|
||||
# wraps it properly. Otherwise, it runs in shell and freezes the system.
|
||||
./0001-add-python-shebang.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
|
||||
buildInputs = [
|
||||
(python3.withPackages (p: with p; [ numpy tensorflow ]))
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D -m755 -t $out/lib libnc${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
addAutoPatchelfSearchPath $out/lib
|
||||
install -D -m755 -t $out/bin gpt2tc
|
||||
install -T -m755 download_model.sh $out/bin/gpt2-download-model
|
||||
install -T -m755 gpt2convert.py $out/bin/gpt2-convert
|
||||
install -D -m644 -t $out/share/gpt2tc readme.txt gpt2vocab.txt Changelog
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Text completion and compression using GPT-2";
|
||||
homepage = "https://bellard.org/libnc/gpt2tc.html";
|
||||
license = licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ anna328p ];
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/text/grin/default.nix
Normal file
23
pkgs/tools/text/grin/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, fetchFromGitHub, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "grin";
|
||||
version = "1.3.0";
|
||||
namePrefix = "";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "matthew-brett";
|
||||
repo = pname;
|
||||
rev = "1.3.0";
|
||||
sha256 = "057d05vzx4sf415vnh3qj2g351xhb3illjxjs9mdl3nsnb5r84kv";
|
||||
};
|
||||
|
||||
buildInputs = with python3Packages; [ nose ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/matthew-brett/grin";
|
||||
description = "A grep program configured the way I like it";
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = [ lib.maintainers.sjagoe ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/text/grip-search/default.nix
Normal file
31
pkgs/tools/text/grip-search/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, boost, pkg-config, cmake, catch2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "grip-search";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sc0ty";
|
||||
repo = "grip";
|
||||
rev = "v${version}";
|
||||
sha256 = "0bkqarylgzhis6fpj48qbifcd6a26cgnq8784hgnm707rq9kb0rx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake catch2 ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
buildInputs = [ boost ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace src/general/config.h --replace "CUSTOM-BUILD" "${version}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast, indexed regexp search over large file trees";
|
||||
homepage = "https://github.com/sc0ty/grip";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ tex ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 1454525f70b43a6957b7c9e1870e997368787da3 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||||
Date: Fri, 8 Nov 2019 21:59:21 -0500
|
||||
Subject: [PATCH] Fix cross-compilation by looking for `ar`.
|
||||
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
configure.ac | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index d18c49b8..b1b53338 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -494,7 +494,7 @@ CCC=@CXX@
|
||||
# INSTALL_INFO
|
||||
# LN_S
|
||||
|
||||
-AR=ar
|
||||
+AR=@AR@
|
||||
ETAGS=etags
|
||||
ETAGSFLAGS=
|
||||
# Flag that tells etags to assume C++.
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 28e75f17..2449b9f5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -37,6 +37,7 @@ AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
|
||||
AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
@@ -72,6 +73,7 @@ GROFF_DOC_CHECK
|
||||
GROFF_MAKEINFO
|
||||
GROFF_TEXI2DVI
|
||||
AC_PROG_RANLIB
|
||||
+AC_CHECK_TOOL([AR], [ar], [ar])
|
||||
GROFF_INSTALL_SH
|
||||
GROFF_INSTALL_INFO
|
||||
AC_PROG_INSTALL
|
||||
--
|
||||
2.23.0
|
||||
|
||||
141
pkgs/tools/text/groff/default.nix
Normal file
141
pkgs/tools/text/groff/default.nix
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, perl
|
||||
, ghostscript #for postscript and html output
|
||||
, psutils, netpbm #for html output
|
||||
, buildPackages
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, texinfo
|
||||
, bash
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "groff";
|
||||
version = "1.22.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/groff/${pname}-${version}.tar.gz";
|
||||
sha256 = "14q2mldnr1vx0l9lqp9v2f6iww24gj28iyh4j2211hyynx67p3p7";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" "doc" "info" "perl" ];
|
||||
|
||||
# Parallel build is failing for missing depends. Known upstream as:
|
||||
# https://savannah.gnu.org/bugs/?62084
|
||||
enableParallelBuilding = false;
|
||||
|
||||
patches = [
|
||||
./0001-Fix-cross-compilation-by-looking-for-ar.patch
|
||||
]
|
||||
++ lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "9") [
|
||||
# https://trac.macports.org/ticket/59783
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/openembedded/openembedded-core/ce265cf467f1c3e5ba2edbfbef2170df1a727a52/meta/recipes-extended/groff/files/0001-Include-config.h.patch";
|
||||
sha256 = "1b0mg31xkpxkzlx696nr08rcc7ndpaxdplvysy0hw5099c4n1wyf";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# BASH_PROG gets replaced with a path to the build bash which doesn't get automatically patched by patchShebangs
|
||||
substituteInPlace contrib/gdiffmk/gdiffmk.sh \
|
||||
--replace "@BASH_PROG@" "/bin/sh"
|
||||
'' + lib.optionalString (psutils != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "psselect" "${psutils}/bin/psselect"
|
||||
'' + lib.optionalString (netpbm != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "pnmcut" "${lib.getBin netpbm}/bin/pnmcut" \
|
||||
--replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \
|
||||
--replace "pnmtopng" "${lib.getBin netpbm}/bin/pnmtopng"
|
||||
substituteInPlace tmac/www.tmac \
|
||||
--replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \
|
||||
--replace "pngtopnm" "${lib.getBin netpbm}/bin/pngtopnm" \
|
||||
--replace "@PNMTOPS_NOSETPAGE@" "${lib.getBin netpbm}/bin/pnmtops -nosetpage"
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
buildInputs = [ ghostscript psutils netpbm perl bash ];
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config texinfo ];
|
||||
|
||||
# Builds running without a chroot environment may detect the presence
|
||||
# of /usr/X11 in the host system, leading to an impure build of the
|
||||
# package. To avoid this issue, X11 support is explicitly disabled.
|
||||
# Note: If we ever want to *enable* X11 support, then we'll probably
|
||||
# have to pass "--with-appresdir", too.
|
||||
configureFlags = [
|
||||
"--without-x"
|
||||
"ac_cv_path_PERL=${buildPackages.perl}/bin/perl"
|
||||
] ++ lib.optionals (ghostscript != null) [
|
||||
"--with-gs=${ghostscript}/bin/gs"
|
||||
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
"gl_cv_func_signbit=yes"
|
||||
];
|
||||
|
||||
makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
# Trick to get the build system find the proper 'native' groff
|
||||
# http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html
|
||||
"GROFF_BIN_PATH=${buildPackages.groff}/bin"
|
||||
"GROFFBIN=${buildPackages.groff}/bin/groff"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
for f in 'man.local' 'mdoc.local'; do
|
||||
cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f"
|
||||
done
|
||||
|
||||
moveToOutput bin/gropdf $perl
|
||||
moveToOutput bin/pdfmom $perl
|
||||
moveToOutput bin/roff2text $perl
|
||||
moveToOutput bin/roff2pdf $perl
|
||||
moveToOutput bin/roff2ps $perl
|
||||
moveToOutput bin/roff2dvi $perl
|
||||
moveToOutput bin/roff2ps $perl
|
||||
moveToOutput bin/roff2html $perl
|
||||
moveToOutput bin/glilypond $perl
|
||||
moveToOutput bin/mmroff $perl
|
||||
moveToOutput bin/roff2x $perl
|
||||
moveToOutput bin/afmtodit $perl
|
||||
moveToOutput bin/gperl $perl
|
||||
moveToOutput bin/chem $perl
|
||||
|
||||
moveToOutput bin/gpinyin $perl
|
||||
moveToOutput lib/groff/gpinyin $perl
|
||||
substituteInPlace $perl/bin/gpinyin \
|
||||
--replace $out/lib/groff/gpinyin $perl/lib/groff/gpinyin
|
||||
|
||||
moveToOutput bin/groffer $perl
|
||||
moveToOutput lib/groff/groffer $perl
|
||||
substituteInPlace $perl/bin/groffer \
|
||||
--replace $out/lib/groff/groffer $perl/lib/groff/groffer
|
||||
|
||||
moveToOutput bin/grog $perl
|
||||
moveToOutput lib/groff/grog $perl
|
||||
substituteInPlace $perl/bin/grog \
|
||||
--replace $out/lib/groff/grog $perl/lib/groff/grog
|
||||
|
||||
find $perl/ -type f -print0 | xargs --null sed -i 's|${buildPackages.perl}|${perl}|'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/groff/";
|
||||
description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
|
||||
longDescription = ''
|
||||
groff is the GNU implementation of troff, a document formatting
|
||||
system. Included in this release are implementations of troff,
|
||||
pic, eqn, tbl, grn, refer, -man, -mdoc, -mom, and -ms macros,
|
||||
and drivers for PostScript, TeX dvi format, HP LaserJet 4
|
||||
printers, Canon CAPSL printers, HTML and XHTML format (beta
|
||||
status), and typewriter-like devices. Also included is a
|
||||
modified version of the Berkeley -me macros, the enhanced
|
||||
version gxditview of the X11 xditview previewer, and an
|
||||
implementation of the -mm macros.
|
||||
'';
|
||||
|
||||
outputsToInstall = [ "out" "perl" ];
|
||||
};
|
||||
}
|
||||
19
pkgs/tools/text/groff/site.tmac
Normal file
19
pkgs/tools/text/groff/site.tmac
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
.
|
||||
.if n \{\
|
||||
. \" Character translations for non-keyboard
|
||||
. \" characters - to make them searchable
|
||||
. if '\*[.T]'utf8' \{\
|
||||
. char \- \N'45'
|
||||
. char - \N'45'
|
||||
. char ' \N'39'
|
||||
. char \' \N'39'
|
||||
. \}
|
||||
.
|
||||
. \" Shut off SGR by default (groff colors)
|
||||
. \" Require GROFF_SGR envvar defined to turn it on
|
||||
. if '\V[GROFF_SGR]'' \
|
||||
. output x X tty: sgr 0
|
||||
.\}
|
||||
.
|
||||
.ds doc-default-operating-system Nixpkgs
|
||||
.ds doc-volume-operating-system Nixpkgs
|
||||
75
pkgs/tools/text/gtranslator/default.nix
Normal file
75
pkgs/tools/text/gtranslator/default.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, itstool
|
||||
, gettext
|
||||
, python3
|
||||
, wrapGAppsHook
|
||||
, libxml2
|
||||
, libgda6
|
||||
, libhandy
|
||||
, libsoup_3
|
||||
, json-glib
|
||||
, gspell
|
||||
, glib
|
||||
, gtk3
|
||||
, gtksourceview4
|
||||
, gnome
|
||||
, gsettings-desktop-schemas
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gtranslator";
|
||||
version = "42.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "Kme8v+ZDBhsGltiaEIR9UL81kF/zNhuYcTV9PjQi8Ts=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
itstool
|
||||
gettext
|
||||
python3
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libxml2
|
||||
glib
|
||||
gtk3
|
||||
gtksourceview4
|
||||
libgda6
|
||||
libhandy
|
||||
libsoup_3
|
||||
json-glib
|
||||
gettext
|
||||
gspell
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x build-aux/meson/meson_post_install.py
|
||||
patchShebangs build-aux/meson/meson_post_install.py
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNOME translation making program";
|
||||
homepage = "https://wiki.gnome.org/Apps/Gtranslator";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/text/gucci/default.nix
Normal file
31
pkgs/tools/text/gucci/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, testers, gucci }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gucci";
|
||||
version = "1.5.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "noqcks";
|
||||
repo = "gucci";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-HJPNpLRJPnziSMvxLCiNDeCWO439ELSZs/4Cq1a7Amo=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-rAZCj5xtwTgd9/KDYnQTU1jbabtWJF5MCFgcmixDN/Q=";
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.AppVersion=${version}" ];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = gucci;
|
||||
};
|
||||
|
||||
checkFlags = [ "-short" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple CLI templating tool written in golang";
|
||||
homepage = "https://github.com/noqcks/gucci";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ braydenjw ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
43
pkgs/tools/text/hck/default.nix
Normal file
43
pkgs/tools/text/hck/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, stdenv
|
||||
, CoreFoundation
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "hck";
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sstadick";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-6PXhFOXWplj7yEyn7hOQSPS2YDGc1nxTs6wRseRvEVk=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-VAtvc8K4282twB1MRY72+dCky3JmrTRjOPx1Ft7Oqt8=";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
|
||||
|
||||
# link System as a dylib instead of a framework on macos
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
core_affinity=../$(stripHash $cargoDeps)/core_affinity
|
||||
oldHash=$(sha256sum $core_affinity/src/lib.rs | cut -d " " -f 1)
|
||||
substituteInPlace $core_affinity/src/lib.rs --replace framework dylib
|
||||
substituteInPlace $core_affinity/.cargo-checksum.json \
|
||||
--replace $oldHash $(sha256sum $core_affinity/src/lib.rs | cut -d " " -f 1)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A close to drop in replacement for cut that can use a regex delimiter instead of a fixed string";
|
||||
homepage = "https://github.com/sstadick/hck";
|
||||
changelog = "https://github.com/sstadick/hck/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ mit /* or */ unlicense ];
|
||||
maintainers = with maintainers; [ figsoda ];
|
||||
};
|
||||
}
|
||||
62
pkgs/tools/text/highlight/default.nix
Normal file
62
pkgs/tools/text/highlight/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, fetchFromGitLab, getopt, lua, boost, pkg-config, swig, perl, gcc }:
|
||||
|
||||
let
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "highlight";
|
||||
version = "4.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "saalen";
|
||||
repo = "highlight";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KkLN8b2sJhDbYVfNANEg1prPfIySoL9N48PSQyXqE8I=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ pkg-config swig perl ]
|
||||
++ lib.optional stdenv.isDarwin gcc;
|
||||
|
||||
buildInputs = [ getopt lua boost ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/makefile \
|
||||
--replace "shell pkg-config" "shell $PKG_CONFIG"
|
||||
substituteInPlace makefile \
|
||||
--replace 'gzip' 'gzip -n'
|
||||
'' + lib.optionalString stdenv.cc.isClang ''
|
||||
substituteInPlace src/makefile \
|
||||
--replace 'CXX=g++' 'CXX=clang++'
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
makeFlags="PREFIX=$out conf_dir=$out/etc/highlight/ CXX=$CXX AR=$AR"
|
||||
'';
|
||||
|
||||
# This has to happen _before_ the main build because it does a
|
||||
# `make clean' for some reason.
|
||||
preBuild = lib.optionalString (!stdenv.isDarwin) ''
|
||||
make -C extras/swig $makeFlags perl
|
||||
'';
|
||||
|
||||
postCheck = lib.optionalString (!stdenv.isDarwin) ''
|
||||
perl -Iextras/swig extras/swig/testmod.pl
|
||||
'';
|
||||
|
||||
preInstall = lib.optionalString (!stdenv.isDarwin) ''
|
||||
mkdir -p $out/${perl.libPrefix}
|
||||
install -m644 extras/swig/highlight.{so,pm} $out/${perl.libPrefix}
|
||||
make -C extras/swig clean # Clean up intermediate files.
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Source code highlighting tool";
|
||||
homepage = "http://www.andre-simon.de/doku/highlight/en/highlight.php";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ willibutz ];
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
if stdenv.isDarwin then self
|
||||
else perl.pkgs.toPerlModule self
|
||||
40
pkgs/tools/text/hottext/default.nix
Normal file
40
pkgs/tools/text/hottext/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, nimPackages, fetchurl, gentium, makeDesktopItem }:
|
||||
|
||||
nimPackages.buildNimPackage rec {
|
||||
pname = "hottext";
|
||||
version = "1.4";
|
||||
|
||||
nimBinOnly = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://git.sr.ht/~ehmry/hottext/archive/v${version}.tar.gz";
|
||||
sha256 = "sha256-hIUofi81zowSMbt1lUsxCnVzfJGN3FEiTtN8CEFpwzY=";
|
||||
};
|
||||
|
||||
buildInputs = with nimPackages; [
|
||||
pixie
|
||||
sdl2
|
||||
];
|
||||
|
||||
HOTTEXT_FONT_PATH = "${gentium}/share/fonts/truetype/GentiumPlus-Regular.ttf";
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
categories = [ "Utility" ];
|
||||
comment = meta.description;
|
||||
desktopName = pname;
|
||||
exec = pname;
|
||||
name = pname;
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
cp -r $desktopItem/* $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
broken = true; # Needs to be updated to latest Pixie API.
|
||||
description = "Simple RSVP speed-reading utility";
|
||||
license = licenses.unlicense;
|
||||
homepage = "https://git.sr.ht/~ehmry/hottext";
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/text/html-tidy/default.nix
Normal file
42
pkgs/tools/text/html-tidy/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, libxslt, html-tidy }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "html-tidy";
|
||||
version = "5.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "htacg";
|
||||
repo = "tidy-html5";
|
||||
rev = version;
|
||||
sha256 = "sha256-ZMz0NySxzX2XHiqB8f5asvwjIG6kdIcq8Gb3EbAxBaU=";
|
||||
};
|
||||
|
||||
# https://github.com/htacg/tidy-html5/pull/1036
|
||||
patches = (fetchpatch {
|
||||
url = "https://github.com/htacg/tidy-html5/commit/e9aa038bd06bd8197a0dc049380bc2945ff55b29.diff";
|
||||
sha256 = "sha256-Q2GjinNBWLL+HXUtslzDJ7CJSTflckbjweiSMCnIVwg=";
|
||||
});
|
||||
|
||||
nativeBuildInputs = [ cmake libxslt/*manpage*/ ]
|
||||
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) html-tidy;
|
||||
|
||||
cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-DHOST_TIDY=tidy"
|
||||
];
|
||||
|
||||
# ATM bin/tidy is statically linked, as upstream provides no other option yet.
|
||||
# https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107
|
||||
|
||||
meta = with lib; {
|
||||
description = "A HTML validator and `tidier'";
|
||||
longDescription = ''
|
||||
HTML Tidy is a command-line tool and C library that can be
|
||||
used to validate and fix HTML data.
|
||||
'';
|
||||
license = licenses.libpng; # very close to it - the 3 clauses are identical
|
||||
homepage = "http://html-tidy.org";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
mainProgram = "tidy";
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/text/html2text/default.nix
Normal file
33
pkgs/tools/text/html2text/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "html2text";
|
||||
version = "1.3.2a";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.mbayer.de/html2text/downloads/html2text-${version}.tar.gz";
|
||||
sha256 = "000b39d5d910b867ff7e087177b470a1e26e2819920dcffd5991c33f6d480392";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace configure \
|
||||
--replace /bin/echo echo \
|
||||
--replace CXX=unknown ':'
|
||||
'';
|
||||
|
||||
# the --prefix has no effect
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/man/man{1,5}
|
||||
cp html2text $out/bin
|
||||
cp html2text.1.gz $out/man/man1
|
||||
cp html2textrc.5.gz $out/man/man5
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Convert HTML to plain text";
|
||||
homepage = "http://www.mbayer.de/html2text/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.eikek ];
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/text/hyx/default.nix
Normal file
30
pkgs/tools/text/hyx/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchurl, memstreamHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hyx";
|
||||
version = "2021.06.09";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://yx7.cc/code/hyx/hyx-${lib.replaceStrings [ "-" ] [ "." ] version}.tar.xz";
|
||||
sha256 = "sha256-jU8U5YWE1syPBOQ8o4BC7tIYiCo4kknCCwhnMCVtpes=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "-Wl,-z,relro,-z,now -fpic -pie" ""
|
||||
'';
|
||||
|
||||
buildInputs = lib.optional (stdenv.system == "x86_64-darwin") memstreamHook;
|
||||
|
||||
installPhase = ''
|
||||
install -vD hyx $out/bin/hyx
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "minimalistic but powerful Linux console hex editor";
|
||||
homepage = "https://yx7.cc/code/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/text/icdiff/default.nix
Normal file
34
pkgs/tools/text/icdiff/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, fetchFromGitHub, python3Packages, bash, git, less }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "icdiff";
|
||||
version = "1.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jeffkaufman";
|
||||
repo = "icdiff";
|
||||
rev = "release-${version}";
|
||||
sha256 = "080v8h09pv8qwplin4kwfm0kmqjwdqjfxbpcdrv16sv4hwfwl5qd";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
bash
|
||||
git
|
||||
less
|
||||
];
|
||||
|
||||
# error: could not lock config file /homeless-shelter/.gitconfig: No such file or directory
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
patchShebangs test.sh
|
||||
./test.sh ${python3Packages.python.interpreter}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jefftk.com/icdiff";
|
||||
description = "Side-by-side highlighted command line diffs";
|
||||
maintainers = with maintainers; [ ];
|
||||
license = licenses.psfl;
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/text/igrep/default.nix
Normal file
37
pkgs/tools/text/igrep/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, Security
|
||||
, testers
|
||||
, igrep
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "igrep";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "konradsz";
|
||||
repo = "igrep";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-mJtxqwbqofiDuiGokn24qdnck27w7w/3A5mdqZIU88U=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-ikU4SRLu7PQGbidPmf2W39e3sE8QY8YMU6Q0eWhgvLM=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
passthru.tests = {
|
||||
version = testers.testVersion { package = igrep; command = "ig --version"; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interactive Grep";
|
||||
homepage = "https://github.com/konradsz/igrep";
|
||||
changelog = "https://github.com/konradsz/igrep/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ _0x4A6F ];
|
||||
mainProgram = "ig";
|
||||
};
|
||||
}
|
||||
58
pkgs/tools/text/invoice2data/default.nix
Normal file
58
pkgs/tools/text/invoice2data/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, imagemagick
|
||||
, python3
|
||||
, tesseract
|
||||
, xpdf
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "invoice2data";
|
||||
version = "0.3.6";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "invoice-x";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-t1jgLyKtQsLINlnkCdSbVfTM6B/EiD1yGtx9UHjyZVE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
setuptools-git
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
chardet
|
||||
dateparser
|
||||
pdfminer-six
|
||||
pillow
|
||||
pyyaml
|
||||
unidecode
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "pytest-runner" ""
|
||||
'';
|
||||
|
||||
makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [
|
||||
imagemagick
|
||||
tesseract
|
||||
xpdf
|
||||
])];
|
||||
|
||||
# Tests fails even when ran manually on my ubuntu machine !!
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"invoice2data"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Data extractor for PDF invoices";
|
||||
homepage = "https://github.com/invoice-x/invoice2data";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ psyanticy ];
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/text/ispell/default.nix
Normal file
38
pkgs/tools/text/ispell/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, bison, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ispell";
|
||||
version = "3.4.04";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.cs.hmc.edu/~geoff/tars/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-h7zW8FIdhaCjp4NCFZVtdOvEkxRMx8eR+HvmhyzP4T4=";
|
||||
};
|
||||
|
||||
buildInputs = [ bison ncurses ];
|
||||
|
||||
postPatch = ''
|
||||
cat >> local.h <<EOF
|
||||
${lib.optionalString (!stdenv.isDarwin) "#define USG"}
|
||||
#define TERMLIB "-lncurses"
|
||||
#define LANGUAGES "{american,MASTERDICTS=american.med,HASHFILES=americanmed.hash}"
|
||||
#define MASTERHASH "americanmed.hash"
|
||||
#define BINDIR "$out/bin"
|
||||
#define LIBDIR "$out/lib"
|
||||
#define ELISPDIR "{$out}/share/emacs/site-lisp"
|
||||
#define TEXINFODIR "$out/share/info"
|
||||
#define MAN1DIR "$out/share/man/man1"
|
||||
#define MAN4DIR "$out/share/man/man4"
|
||||
#define MAN45DIR "$out/share/man/man5"
|
||||
#define MINIMENU
|
||||
#define HAS_RENAME
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An interactive spell-checking program for Unix";
|
||||
homepage = "https://www.cs.hmc.edu/~geoff/ispell.html";
|
||||
license = licenses.free;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/text/jbofihe/default.nix
Normal file
29
pkgs/tools/text/jbofihe/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bison, flex, perl, }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jbofihe";
|
||||
version = "0.43";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lojban";
|
||||
repo = "jbofihe";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xx7x1256sjncyzx656jl6jl546vn8zz0siymqalz6v9yf341p98";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison flex perl ];
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
(cd tests && ./run *.in)
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Parser & analyser for Lojban";
|
||||
homepage = "https://github.com/lojban/jbofihe";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ chkno ];
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/text/jsawk/default.nix
Normal file
28
pkgs/tools/text/jsawk/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, spidermonkey_78 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "jsawk";
|
||||
version = "1.5-pre";
|
||||
src = fetchFromGitHub {
|
||||
owner = "micha";
|
||||
repo = "jsawk";
|
||||
rev = "5a14c4af3c7b59807701b70a954ecefc6f77e978";
|
||||
sha256 = "0z3vdr3c8nvdrrxkjv9b4xg47mdb2hsknxpimw6shgwbigihapyr";
|
||||
};
|
||||
dontBuild = true;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/jsawk $out/bin/
|
||||
wrapProgram $out/bin/jsawk \
|
||||
--prefix PATH : "${spidermonkey_78}/bin"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Like awk, but for JSON";
|
||||
homepage = "https://github.com/micha/jsawk";
|
||||
license = lib.licenses.publicDomain;
|
||||
maintainers = with lib.maintainers; [ puffnfresh ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
From c52a5046e19718a43d48c9b3cfdc121d964e8c3b Mon Sep 17 00:00:00 2001
|
||||
From: Maximilian Bosch <maximilian@mbosch.me>
|
||||
Date: Fri, 28 Jan 2022 17:43:35 +0100
|
||||
Subject: [PATCH] Exclude all tests from the build
|
||||
|
||||
For some reason it isn't sufficient to set `-DJPP_ENABLE_TESTS=OFF`.
|
||||
Doing that because the tests on 2.0.0-rc3 don't seem to be working and
|
||||
the vendored catch2 doesn't build with glibc 2.34.
|
||||
---
|
||||
src/CMakeLists.txt | 3 +--
|
||||
src/core/CMakeLists.txt | 11 +----------
|
||||
src/core/analysis/CMakeLists.txt | 2 --
|
||||
src/core/codegen/CMakeLists.txt | 3 ---
|
||||
src/core/spec/CMakeLists.txt | 2 --
|
||||
src/core/training/CMakeLists.txt | 2 --
|
||||
src/jumandic/CMakeLists.txt | 8 +-------
|
||||
src/rnn/CMakeLists.txt | 5 +----
|
||||
src/util/CMakeLists.txt | 2 --
|
||||
9 files changed, 4 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 169dff5..64b6a07 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -67,7 +67,6 @@ function(jpp_feature_codegen)
|
||||
endfunction(jpp_feature_codegen)
|
||||
|
||||
add_subdirectory(util)
|
||||
-add_subdirectory(testing)
|
||||
add_subdirectory(core)
|
||||
add_subdirectory(jumandic)
|
||||
-add_subdirectory(rnn)
|
||||
\ No newline at end of file
|
||||
+add_subdirectory(rnn)
|
||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index c63d134..01c825e 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -55,20 +55,11 @@ set(core_hdrs
|
||||
${core_hdrs}
|
||||
)
|
||||
|
||||
-set(core_test_srcs
|
||||
- ${core_test_srcs}
|
||||
- ${core_tsrcs}
|
||||
- test/test_analyzer_env.h
|
||||
- ../testing/test_analyzer.h
|
||||
- )
|
||||
-
|
||||
add_library(jpp_core ${core_srcs} ${core_hdrs} ${libs3p_pegtl_headers})
|
||||
-jpp_test_executable(jpp_core_tests ${core_test_srcs})
|
||||
|
||||
target_include_directories(jpp_core PUBLIC ${jpp_core_cfg_dir})
|
||||
|
||||
target_link_libraries(jpp_core PUBLIC jpp_util jpp_rnn PRIVATE pathie)
|
||||
-target_link_libraries(jpp_core_tests jpp_core jpp_core_train)
|
||||
|
||||
if (${JPP_USE_PROTOBUF})
|
||||
target_include_directories(jpp_core PUBLIC ${Protobuf_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
@@ -78,4 +69,4 @@ endif()
|
||||
add_subdirectory(benchmarks)
|
||||
if (${JPP_ENABLE_DEV_TOOLS})
|
||||
add_subdirectory(devtools)
|
||||
-endif ()
|
||||
\ No newline at end of file
|
||||
+endif ()
|
||||
diff --git a/src/core/analysis/CMakeLists.txt b/src/core/analysis/CMakeLists.txt
|
||||
index 526263e..1b32f8d 100644
|
||||
--- a/src/core/analysis/CMakeLists.txt
|
||||
+++ b/src/core/analysis/CMakeLists.txt
|
||||
@@ -79,5 +79,3 @@ jpp_core_files(core_hdrs
|
||||
)
|
||||
|
||||
|
||||
-jpp_test_executable(jpp_core_analysis_tests ${core_analysis_tsrc})
|
||||
-target_link_libraries(jpp_core_analysis_tests jpp_core)
|
||||
diff --git a/src/core/codegen/CMakeLists.txt b/src/core/codegen/CMakeLists.txt
|
||||
index a905cee..fa759c7 100644
|
||||
--- a/src/core/codegen/CMakeLists.txt
|
||||
+++ b/src/core/codegen/CMakeLists.txt
|
||||
@@ -30,7 +30,4 @@ set(jpp_codegen_tsrcs
|
||||
|
||||
add_library(jpp_core_codegen ${jpp_codegen_srcs} ${jpp_codegen_hdrs})
|
||||
|
||||
-jpp_test_executable(jpp_codegen_tests ${jpp_codegen_tsrcs})
|
||||
-target_include_directories(jpp_codegen_tests PRIVATE ${cgtest02_INCLUDE})
|
||||
target_link_libraries(jpp_core_codegen jpp_core)
|
||||
-target_link_libraries(jpp_codegen_tests jpp_core_codegen)
|
||||
\ No newline at end of file
|
||||
diff --git a/src/core/spec/CMakeLists.txt b/src/core/spec/CMakeLists.txt
|
||||
index f495d67..da827b9 100644
|
||||
--- a/src/core/spec/CMakeLists.txt
|
||||
+++ b/src/core/spec/CMakeLists.txt
|
||||
@@ -33,5 +33,3 @@ jpp_core_files(core_hdrs
|
||||
|
||||
)
|
||||
|
||||
-jpp_test_executable(jpp_core_spec_tests ${core_spec_tsrc} ${libs3p_pegtl_headers})
|
||||
-target_link_libraries(jpp_core_spec_tests jpp_core)
|
||||
\ No newline at end of file
|
||||
diff --git a/src/core/training/CMakeLists.txt b/src/core/training/CMakeLists.txt
|
||||
index 960437e..4ede9e1 100644
|
||||
--- a/src/core/training/CMakeLists.txt
|
||||
+++ b/src/core/training/CMakeLists.txt
|
||||
@@ -39,7 +39,5 @@ set(core_train_hdrs
|
||||
|
||||
|
||||
add_library(jpp_core_train ${core_train_src} ${core_train_hdrs})
|
||||
-jpp_test_executable(jpp_core_train_tests ${core_train_tsrc})
|
||||
|
||||
target_link_libraries(jpp_core_train jpp_core)
|
||||
-target_link_libraries(jpp_core_train_tests jpp_core_train)
|
||||
\ No newline at end of file
|
||||
diff --git a/src/jumandic/CMakeLists.txt b/src/jumandic/CMakeLists.txt
|
||||
index bef3149..85a8b5d 100644
|
||||
--- a/src/jumandic/CMakeLists.txt
|
||||
+++ b/src/jumandic/CMakeLists.txt
|
||||
@@ -53,10 +53,6 @@ if (${JPP_USE_PROTOBUF})
|
||||
endif ()
|
||||
|
||||
|
||||
-jpp_test_executable(jpp_jumandic_tests ${jumandic_tests})
|
||||
-jpp_test_executable(jpp_bug_tests ${bug_test_sources})
|
||||
-target_include_directories(jpp_jumandic_tests PRIVATE ${jpp_jumandic_cg_INCLUDE})
|
||||
-
|
||||
add_executable(jpp_jumandic_bootstrap main/bootstrap.cc)
|
||||
add_executable(jumanpp_v2 main/jumanpp.cc)
|
||||
add_executable(jumanpp_v2_train main/jumanpp_train.cc main/jumanpp_train.h)
|
||||
@@ -64,11 +60,9 @@ add_executable(jpp_jumandic_pathdiff main/path_diff.cc)
|
||||
target_include_directories(jpp_jumandic_pathdiff PRIVATE ${jpp_jumandic_cg_INCLUDE})
|
||||
|
||||
target_link_libraries(jpp_jumandic jpp_jumandic_spec)
|
||||
-target_link_libraries(jpp_jumandic_tests jpp_jumandic jpp_core_train)
|
||||
-target_link_libraries(jpp_bug_tests jpp_jumandic jpp_core_train)
|
||||
target_link_libraries(jpp_jumandic_bootstrap jpp_jumandic)
|
||||
target_link_libraries(jumanpp_v2 jpp_jumandic)
|
||||
target_link_libraries(jumanpp_v2_train jpp_jumandic jpp_core_train)
|
||||
target_link_libraries(jpp_jumandic_pathdiff jpp_jumandic)
|
||||
|
||||
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jumanpp_v2 RENAME jumanpp DESTINATION bin)
|
||||
\ No newline at end of file
|
||||
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/jumanpp_v2 RENAME jumanpp DESTINATION bin)
|
||||
diff --git a/src/rnn/CMakeLists.txt b/src/rnn/CMakeLists.txt
|
||||
index 448ba51..ca09a00 100644
|
||||
--- a/src/rnn/CMakeLists.txt
|
||||
+++ b/src/rnn/CMakeLists.txt
|
||||
@@ -1,12 +1,9 @@
|
||||
set(jpp_rnn_sources mikolov_rnn.cc)
|
||||
set(jpp_rnn_includes mikolov_rnn.h simple_rnn_impl.h mikolov_rnn_impl.h rnn_arg_parse.h)
|
||||
-set(jpp_rnn_tests mikolov_rnn_test.cc)
|
||||
|
||||
add_library(jpp_rnn ${jpp_rnn_sources} ${jpp_rnn_includes} )
|
||||
add_library(jumanpp_rnn_legacy legacy/rnnlmlib.h legacy/rnnlmlib_static.h legacy/rnnlmlib_static.cpp)
|
||||
|
||||
-jpp_test_executable(jpp_rnn_tests ${jpp_rnn_tests})
|
||||
target_link_libraries(jpp_rnn jpp_util)
|
||||
-target_link_libraries(jpp_rnn_tests jpp_rnn jumanpp_rnn_legacy)
|
||||
|
||||
-target_link_libraries(jumanpp_rnn_legacy jpp_util)
|
||||
\ No newline at end of file
|
||||
+target_link_libraries(jumanpp_rnn_legacy jpp_util)
|
||||
diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt
|
||||
index 53b6c57..c4599d5 100644
|
||||
--- a/src/util/CMakeLists.txt
|
||||
+++ b/src/util/CMakeLists.txt
|
||||
@@ -25,8 +25,6 @@ endif()
|
||||
|
||||
|
||||
add_library(jpp_util ${jpp_util_sources} ${jpp_util_headers} ${BACKWARD_headers})
|
||||
-jpp_test_executable(jpp_util_test ${jpp_util_test_srcs} ${jpp_util_headers})
|
||||
-target_link_libraries(jpp_util_test jpp_util)
|
||||
target_link_libraries(jpp_util ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(jpp_util PUBLIC ${JPP_LIBS_DIR} ${JPP_SRC_DIR})
|
||||
target_compile_features(jpp_util PUBLIC
|
||||
--
|
||||
2.33.1
|
||||
|
||||
31
pkgs/tools/text/jumanpp/default.nix
Normal file
31
pkgs/tools/text/jumanpp/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchurl, cmake, protobuf, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jumanpp";
|
||||
version = "2.0.0-rc3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ku-nlp/${pname}/releases/download/v${version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-ASdr6qbkSe71M7QmuuwidCa4xQhDVoXBJ2XqvSY53pQ=";
|
||||
};
|
||||
|
||||
patches = [ ./0001-Exclude-all-tests-from-the-build.patch ];
|
||||
cmakeFlags = [ "-DJPP_ENABLE_TESTS=OFF" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ protobuf ]
|
||||
++ lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Japanese morphological analyser using a recurrent neural network language model (RNNLM)";
|
||||
longDescription = ''
|
||||
JUMAN++ is a new morphological analyser that considers semantic
|
||||
plausibility of word sequences by using a recurrent neural network
|
||||
language model (RNNLM).
|
||||
'';
|
||||
homepage = "https://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN++";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ mt-caret ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/text/justify/default.nix
Normal file
33
pkgs/tools/text/justify/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitea
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "justify";
|
||||
version = "unstable-2022-03-19";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "tildegit.org";
|
||||
owner = "jns";
|
||||
repo = "justify";
|
||||
rev = "0d397c20ed921c8e091bf18e548d174e15810e62";
|
||||
sha256 = "sha256-406OhJt2Ila/LIhfqJXhbFqFxJJiRyMVI4/VK8Y43kc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
installPhase = ''
|
||||
install -D justify $out/bin/justify
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://tildegit.org/jns/justify";
|
||||
description = "Simple text alignment tool that supports left/right/center/fill justify alignment";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "justify";
|
||||
maintainers = with maintainers; [ xfnw ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/text/kakasi/default.nix
Normal file
35
pkgs/tools/text/kakasi/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kakasi";
|
||||
version = "2.3.6";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Kanji Kana Simple Inverter";
|
||||
longDescription = ''
|
||||
KAKASI is the language processing filter to convert Kanji
|
||||
characters to Hiragana, Katakana or Romaji and may be
|
||||
helpful to read Japanese documents.
|
||||
'';
|
||||
homepage = "http://kakasi.namazu.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://kakasi.namazu.org/stable/kakasi-${version}.tar.xz";
|
||||
sha256 = "1qry3xqb83pjgxp3my8b1sy77z4f0893h73ldrvdaky70cdppr9f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
for a in tests/kakasi-* ; do
|
||||
substituteInPlace $a \
|
||||
--replace "/bin/echo" echo
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = false; # fails 1 of 6 tests
|
||||
|
||||
}
|
||||
39
pkgs/tools/text/kdiff3/default.nix
Normal file
39
pkgs/tools/text/kdiff3/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ mkDerivation
|
||||
, lib
|
||||
, fetchurl
|
||||
, extra-cmake-modules
|
||||
, kdoctools
|
||||
, wrapGAppsHook
|
||||
, boost
|
||||
, kcrash
|
||||
, kconfig
|
||||
, kinit
|
||||
, kparts
|
||||
, kiconthemes
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "kdiff3";
|
||||
version = "1.9.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.kde.org/stable/${pname}/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-CDchWW2dQ3O8LxKYOUqN21tVp61NckKTOnzYrmRoPBo=";
|
||||
};
|
||||
|
||||
buildInputs = [ boost ];
|
||||
|
||||
nativeBuildInputs = [ extra-cmake-modules kdoctools wrapGAppsHook ];
|
||||
|
||||
propagatedBuildInputs = [ kconfig kcrash kinit kparts kiconthemes ];
|
||||
|
||||
cmakeFlags = [ "-Wno-dev" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Compares and merges 2 or 3 files or directories";
|
||||
homepage = "https://invent.kde.org/sdk/kdiff3";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ peterhoeg ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/text/kytea/default.nix
Normal file
32
pkgs/tools/text/kytea/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
pname = "kytea";
|
||||
version = "0.4.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.phontron.com/kytea/download/${pname}-${version}.tar.gz";
|
||||
sha256 = "0ilzzwn5vpvm65bnbyb9f5rxyxy3jmbafw9w0lgl5iad1ka36jjk";
|
||||
};
|
||||
|
||||
patches = [ ./gcc-O3.patch ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.phontron.com/kytea/";
|
||||
description = "General toolkit developed for analyzing text";
|
||||
|
||||
longDescription = ''
|
||||
A general toolkit developed for analyzing text, with a focus on Japanese,
|
||||
Chinese and other languages requiring word or morpheme segmentation.
|
||||
'';
|
||||
|
||||
license = licenses.asl20;
|
||||
|
||||
maintainers = with maintainers; [ ericsagnes ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
}
|
||||
13
pkgs/tools/text/kytea/gcc-O3.patch
Normal file
13
pkgs/tools/text/kytea/gcc-O3.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/lib/kytea-util.cpp b/src/lib/kytea-util.cpp
|
||||
index 7c8c4c6..4492df1 100644
|
||||
--- a/src/lib/kytea-util.cpp
|
||||
+++ b/src/lib/kytea-util.cpp
|
||||
@@ -49,5 +49,8 @@ void checkValueVecEqual(const std::vector<T> * a, const std::vector<T> * b) {
|
||||
|
||||
+template void checkValueVecEqual(const std::vector<unsigned int> & a, const std::vector<unsigned int> & b);
|
||||
template void checkValueVecEqual(const std::vector<unsigned int> * a, const std::vector<unsigned int> * b);
|
||||
+template void checkValueVecEqual(const std::vector<short> & a, const std::vector<short> & b);
|
||||
template void checkValueVecEqual(const std::vector<short> * a, const std::vector<short> * b);
|
||||
template void checkValueVecEqual(const std::vector<vector<KyteaString> > * a, const std::vector<vector<KyteaString> > * b);
|
||||
+template void checkValueVecEqual(const std::vector<int> & a, const std::vector<int> & b);
|
||||
template void checkValueVecEqual(const std::vector<int> * a, const std::vector<int> * b);
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue