diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-07-09 12:30:28 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:11:31 +0000 |
commit | 55cc63c079f49e81d695a25bc2f5b3902f2bd290 (patch) | |
tree | e705335d97f50b927c76ccb4a3fbde9fab8372b9 /nixpkgs/pkgs/tools/text | |
parent | c26eb6f74d9393127a21eee7a9620a920769f613 (diff) | |
parent | 87807e64a5ef5206b745a40af118c7be8db73681 (diff) | |
download | nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.gz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.bz2 nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.lz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.xz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.zst nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.zip |
Merge commit '87807e64a5ef5206b745a40af118c7be8db73681'
Diffstat (limited to 'nixpkgs/pkgs/tools/text')
-rw-r--r-- | nixpkgs/pkgs/tools/text/chroma/default.nix | 33 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/text/hottext/default.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/text/languagetool/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/text/mdbook/default.nix | 8 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/text/mdcat/default.nix | 15 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/text/num-utils/default.nix | 29 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/text/sd/default.nix | 11 |
7 files changed, 73 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/tools/text/chroma/default.nix b/nixpkgs/pkgs/tools/text/chroma/default.nix index 6511d2dcdbb3..1b9cbcd3727a 100644 --- a/nixpkgs/pkgs/tools/text/chroma/default.nix +++ b/nixpkgs/pkgs/tools/text/chroma/default.nix @@ -1,30 +1,33 @@ -{ lib, buildGoModule, fetchFromGitHub, git }: +{ lib, buildGoModule, fetchFromGitHub }: buildGoModule rec { pname = "chroma"; - version = "0.9.1"; + version = "0.9.2"; src = fetchFromGitHub { owner = "alecthomas"; repo = pname; rev = "v${version}"; - sha256 = "sha256-+4UaQrJh3PBf68rlW1lOEyEVw3vWxfc+Casa5+H8F9A="; + sha256 = "19d7yr6q8kwrm91yyglmw9n7wa861sgi6dbwn8sl6dp55czfwvaq"; + # populate values otherwise taken care of by goreleaser, + # unfortunately these require us to use git. By doing + # this in postFetch we can delete .git afterwards and + # maintain better reproducibility of the src. leaveDotGit = true; - }; + postFetch = '' + cd "$out" - nativeBuildInputs = [ git ]; + commit="$(git rev-parse HEAD)" + date=$(git show -s --format=%aI "$commit") - # populate values otherwise taken care of by goreleaser - # https://github.com/alecthomas/chroma/issues/435 - postPatch = '' - commit="$(git rev-parse HEAD)" - date=$(git show -s --format=%aI "$commit") + substituteInPlace "$out/cmd/chroma/main.go" \ + --replace 'version = "?"' 'version = "${version}"' \ + --replace 'commit = "?"' "commit = \"$commit\"" \ + --replace 'date = "?"' "date = \"$date\"" - substituteInPlace cmd/chroma/main.go \ - --replace 'version = "?"' 'version = "${version}"' \ - --replace 'commit = "?"' "commit = \"$commit\"" \ - --replace 'date = "?"' "date = \"$date\"" - ''; + find "$out" -name .git -print0 | xargs -0 rm -rf + ''; + }; vendorSha256 = "0y8mp08zccn9qxrsj9j7vambz8dwzsxbbgrlppzam53rg8rpxhrg"; diff --git a/nixpkgs/pkgs/tools/text/hottext/default.nix b/nixpkgs/pkgs/tools/text/hottext/default.nix index 6d361f50f35a..2e9d0a909a2a 100644 --- a/nixpkgs/pkgs/tools/text/hottext/default.nix +++ b/nixpkgs/pkgs/tools/text/hottext/default.nix @@ -67,7 +67,7 @@ in stdenv.mkDerivation rec { nimFlags = [ "-d:release" ] ++ map (lib: "--path:${lib}/src") nimLibs; - HOTTEXT_FONT_PATH = "${gentium}/share/fonts/truetype/GentiumPlus-R.ttf"; + HOTTEXT_FONT_PATH = "${gentium}/share/fonts/truetype/GentiumPlus-Regular.ttf"; buildPhase = '' runHook preBuild diff --git a/nixpkgs/pkgs/tools/text/languagetool/default.nix b/nixpkgs/pkgs/tools/text/languagetool/default.nix index 810e3feaa228..791d779bf833 100644 --- a/nixpkgs/pkgs/tools/text/languagetool/default.nix +++ b/nixpkgs/pkgs/tools/text/languagetool/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "LanguageTool"; - version = "5.3"; + version = "5.4"; src = fetchzip { url = "https://www.languagetool.org/download/${pname}-${version}.zip"; - sha256 = "1km20ajqb65vkhkrf94zy5srcss66ix8padp7ng59pa8pj11wmi2"; + sha256 = "sha256-2khadADfzwkW+J0uafPWJ6xUQRSQDm8seiBHueQGmKI="; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ jre ]; diff --git a/nixpkgs/pkgs/tools/text/mdbook/default.nix b/nixpkgs/pkgs/tools/text/mdbook/default.nix index a8c5efb0a493..29007dd1282d 100644 --- a/nixpkgs/pkgs/tools/text/mdbook/default.nix +++ b/nixpkgs/pkgs/tools/text/mdbook/default.nix @@ -1,17 +1,17 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, darwin }: +{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices }: rustPlatform.buildRustPackage rec { pname = "mdbook"; - version = "0.4.9"; + version = "0.4.10"; src = fetchFromGitHub { owner = "rust-lang-nursery"; repo = "mdBook"; rev = "v${version}"; - sha256 = "sha256-wc3poiLnIHbbl0j2sWQkEbxccpohPnvjLPdNuKfsDSY="; + sha256 = "sha256-1Ddy/kb2Q7P+tzyEr3EC3qWm6MGSsDL3/vnPJLAm/J0="; }; - cargoSha256 = "sha256-2DNfacPp9IMke2j8WYxpGmMxityaFGyXrc0jOyqPl3c="; + cargoSha256 = "sha256-x2BwnvEwTqz378aDE7OHWuEwNEsUnRudLq7sUJjHRpA="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; diff --git a/nixpkgs/pkgs/tools/text/mdcat/default.nix b/nixpkgs/pkgs/tools/text/mdcat/default.nix index 6f6750b1b02c..e298a56c58c2 100644 --- a/nixpkgs/pkgs/tools/text/mdcat/default.nix +++ b/nixpkgs/pkgs/tools/text/mdcat/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , rustPlatform , pkg-config @@ -11,19 +12,20 @@ rustPlatform.buildRustPackage rec { pname = "mdcat"; - version = "0.22.2"; + version = "0.23.0"; src = fetchFromGitHub { owner = "lunaryorn"; repo = pname; rev = "mdcat-${version}"; - hash = "sha256-i36MYTMkbSuWxxlWUDsyYMay/4Mg7M5jEFhHM60UrkM="; + hash = "sha256-bGXuYGQyrXa9gUEQfB7BF9K04z88r1UoM8R5gpL2nRM="; }; nativeBuildInputs = [ pkg-config asciidoctor installShellFiles ]; - buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security; + buildInputs = [ openssl ] + ++ lib.optional stdenv.isDarwin Security; - cargoSha256 = "sha256-y9yg4EQDL+RcD6NI7n6W/Hi6Tw4Wr1Kf6hbcIuidIf4="; + cargoSha256 = "sha256-hmv4LNk7NEYjT/5XXUpMd+xGS19KHOW+HIgsiFEWeig="; checkInputs = [ ansi2html ]; # Skip tests that use the network and that include files. @@ -32,6 +34,7 @@ rustPlatform.buildRustPackage rec { "--skip magic::tests::detect_mimetype_of_magic_param_bytes_max_length" "--skip magic::tests::detect_mimetype_of_png_image" "--skip magic::tests::detect_mimetype_of_svg_image" + "--skip resources::tests::read_url_with_http_url_fails_when_size_limit_is_exceeded" "--skip resources::tests::read_url_with_http_url_fails_when_status_404" "--skip resources::tests::read_url_with_http_url_returns_content_when_status_200" "--skip iterm2_tests_render_md_samples_images_md" @@ -48,6 +51,6 @@ rustPlatform.buildRustPackage rec { description = "cat for markdown"; homepage = "https://github.com/lunaryorn/mdcat"; license = with licenses; [ asl20 ]; - maintainers = with maintainers; [ davidtwco ]; + maintainers = with maintainers; [ davidtwco SuperSandro2000 ]; }; } diff --git a/nixpkgs/pkgs/tools/text/num-utils/default.nix b/nixpkgs/pkgs/tools/text/num-utils/default.nix new file mode 100644 index 000000000000..14784a4e8cfc --- /dev/null +++ b/nixpkgs/pkgs/tools/text/num-utils/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchurl, perl }: + +stdenv.mkDerivation rec { + pname = "num-utils"; + version = "0.5"; + + src = fetchurl { + url = "https://suso.suso.org/programs/num-utils/downloads/num-utils-${version}.tar.gz"; + sha256 = "0kn6yskjww2agcqvas5l2xp55mp4njdxqkdicchlji3qzih2fn83"; + }; + + buildInputs = [ perl ]; + + patchPhase = '' + substituteInPlace Makefile --replace "-o 0 -g 0" "" --replace "\$(RPMDIR)" "" + ''; + makeFlags = [ + "TOPDIR=${placeholder "out"}" + "PERL=${perl}/bin/perl" + ]; + + meta = with lib; { + description = "Programs for dealing with numbers from the command line"; + homepage = "https://suso.suso.org/xulu/Num-utils"; + license = licenses.gpl2Plus; + platforms = platforms.all; + maintainers = [ maintainers.catern ]; + }; +} diff --git a/nixpkgs/pkgs/tools/text/sd/default.nix b/nixpkgs/pkgs/tools/text/sd/default.nix index 1536e72ad29e..009150062db2 100644 --- a/nixpkgs/pkgs/tools/text/sd/default.nix +++ b/nixpkgs/pkgs/tools/text/sd/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, Security +{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }: rustPlatform.buildRustPackage rec { @@ -14,8 +14,17 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1iwgy9zzdxay6hb9pz47jchy03jrsy5csxijlq4i228qhqnvq1lr"; + nativeBuildInputs = [ installShellFiles ]; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; + preFixup = '' + installManPage $releaseDir/build/sd-*/out/sd.1 + + installShellCompletion $releaseDir/build/sd-*/out/sd.{bash,fish} + installShellCompletion --zsh $releaseDir/build/sd-*/out/_sd + ''; + meta = with lib; { description = "Intuitive find & replace CLI (sed alternative)"; homepage = "https://github.com/chmln/sd"; |