From c427b7a82456779d703e9f5f048467b6fb6872e6 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 1 Jan 2024 10:29:18 -0300 Subject: [PATCH 1/2] tecla: migrate to by-name hierarchy --- .../tecla/default.nix => by-name/te/tecla/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/libraries/tecla/default.nix => by-name/te/tecla/package.nix} (100%) diff --git a/pkgs/development/libraries/tecla/default.nix b/pkgs/by-name/te/tecla/package.nix similarity index 100% rename from pkgs/development/libraries/tecla/default.nix rename to pkgs/by-name/te/tecla/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a509bf8a4995..d9003358c6e6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25323,8 +25323,6 @@ with pkgs; tdlib = callPackage ../development/libraries/tdlib { }; - tecla = callPackage ../development/libraries/tecla { }; - tectonic = callPackage ../tools/typesetting/tectonic/wrapper.nix { }; tectonic-unwrapped = callPackage ../tools/typesetting/tectonic { From d5524221a8a6dbee7d2719141772c055db2b2a45 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 1 Jan 2024 10:43:49 -0300 Subject: [PATCH 2/2] tecla: refactor and adopt - finalAttrs design pattern - split man output - update meta - license - longDescription - changelog - adoption by AndersonTorres --- pkgs/by-name/te/tecla/package.nix | 44 ++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/te/tecla/package.nix b/pkgs/by-name/te/tecla/package.nix index 4c6ec8e01691..03631469889b 100644 --- a/pkgs/by-name/te/tecla/package.nix +++ b/pkgs/by-name/te/tecla/package.nix @@ -1,14 +1,19 @@ -{ lib, stdenv, fetchurl }: +{ lib +, stdenv +, fetchurl +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tecla"; version = "1.6.3"; src = fetchurl { - url = "https://www.astro.caltech.edu/~mcs/tecla/libtecla-${version}.tar.gz"; - sha256 = "06pfq5wa8d25i9bdjkp4xhms5101dsrbg82riz7rz1a0a32pqxgj"; + url = "https://www.astro.caltech.edu/~mcs/tecla/libtecla-${finalAttrs.version}.tar.gz"; + hash = "sha256-8nV8xVBAhZ/Pj1mgt7JuAYSiK+zkTtlWikU0pHjB7ho="; }; + outputs = [ "out" "man" ]; + postPatch = '' substituteInPlace install-sh \ --replace "stripprog=" "stripprog=\$STRIP # " @@ -19,10 +24,35 @@ stdenv.mkDerivation rec { }; meta = { - description = "Command-line editing library"; homepage = "https://www.astro.caltech.edu/~mcs/tecla/"; - license = "as-is"; + description = "Command-line editing library"; + longDescription = '' + The tecla library provides UNIX and LINUX programs with interactive + command line editing facilities, similar to those of the UNIX tcsh + shell. In addition to simple command-line editing, it supports recall of + previously entered command lines, TAB completion of file names or other + tokens, and in-line wild-card expansion of filenames. The internal + functions which perform file-name completion and wild-card expansion are + also available externally for optional use by programs. + + In addition, the library includes a path-searching module. This allows an + application to provide completion and lookup of files located in UNIX + style paths. Although not built into the line editor by default, it can + easily be called from custom tab-completion callback functions. This was + originally conceived for completing the names of executables and + providing a way to look up their locations in the user's PATH environment + variable, but it can easily be asked to look up and complete other types + of files in any list of directories. + + Note that special care has been taken to allow the use of this library in + threaded programs. The option to enable this is discussed in the + Makefile, and specific discussions of thread safety are presented in the + included man pages. + ''; + changelog = "https://sites.astro.caltech.edu/~mcs/tecla/release.html"; + license = with lib.licenses; [ mit ]; mainProgram = "enhance"; + maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; }; -} +})