diff --git a/pkgs/by-name/ma/mawk/package.nix b/pkgs/by-name/ma/mawk/package.nix new file mode 100644 index 000000000000..482d6940c7c8 --- /dev/null +++ b/pkgs/by-name/ma/mawk/package.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPackages, + directoryListingUpdater, + fetchurl, + stdenv, + testers, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "mawk"; + version = "1.3.4-20240819"; + + src = fetchurl { + urls = [ + "https://invisible-mirror.net/archives/mawk/mawk-${finalAttrs.version}.tgz" + "ftp://ftp.invisible-island.net/mawk/mawk-${finalAttrs.version}.tgz" + ]; + hash = "sha256-bh/ejuetilwVOCMWhj/WtMbSP6t4HdWrAXf/o+6arlw="; + }; + + depsBuildBuild = [ buildPackages.stdenv.cc ]; + + passthru = { + tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + command = "mawk -W version"; + }; + updateScript = directoryListingUpdater { + inherit (finalAttrs) pname version; + url = "https://invisible-island.net/archives/mawk/"; + }; + }; + + meta = { + homepage = "https://invisible-island.net/mawk/mawk.html"; + changelog = "https://invisible-island.net/mawk/CHANGES"; + description = "Interpreter for the AWK Programming Language"; + license = lib.licenses.gpl2Only; + mainProgram = "mawk"; + maintainers = with lib.maintainers; [ ehmry ]; + platforms = lib.platforms.unix; + }; +}) diff --git a/pkgs/tools/text/mawk/default.nix b/pkgs/tools/text/mawk/default.nix deleted file mode 100644 index 700b20c2178c..000000000000 --- a/pkgs/tools/text/mawk/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, stdenv, fetchurl, buildPackages }: - -stdenv.mkDerivation rec { - pname = "mawk"; - version = "1.3.4-20240622"; - - src = fetchurl { - urls = [ - "ftp://ftp.invisible-island.net/mawk/mawk-${version}.tgz" - "https://invisible-mirror.net/archives/mawk/mawk-${version}.tgz" - ]; - sha256 = "sha256-TpF+h6ep+692mVeEpLC13A3ZVLl30JgwMPePagexp2U="; - }; - - depsBuildBuild = [ buildPackages.stdenv.cc ]; - - meta = with lib; { - description = "Interpreter for the AWK Programming Language"; - mainProgram = "mawk"; - homepage = "https://invisible-island.net/mawk/mawk.html"; - license = licenses.gpl2Only; - maintainers = with maintainers; [ ehmry ]; - platforms = with platforms; unix; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2730b1c47e84..9645c6d7550f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10211,8 +10211,6 @@ with pkgs; mars-mips = callPackage ../development/tools/mars-mips { }; - mawk = callPackage ../tools/text/mawk { }; - mb2md = callPackage ../tools/text/mb2md { }; mbuffer = callPackage ../tools/misc/mbuffer { };