From bdfaac30f2e82a24c6dc69cb6a998f1aa2e80289 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Tue, 2 Sep 2025 14:26:24 +0100 Subject: [PATCH 1/4] bashdb: 5.0-1.1.2 -> 5.2-1.1.2-unstable-2025-06-07 Update and fix build for newer bash releases. --- .../by-name/ba/bashdb/bash-5-or-greater.patch | 21 ++++++++ pkgs/by-name/ba/bashdb/package.nix | 49 +++++++++++-------- 2 files changed, 50 insertions(+), 20 deletions(-) create mode 100644 pkgs/by-name/ba/bashdb/bash-5-or-greater.patch diff --git a/pkgs/by-name/ba/bashdb/bash-5-or-greater.patch b/pkgs/by-name/ba/bashdb/bash-5-or-greater.patch new file mode 100644 index 000000000000..360302b30785 --- /dev/null +++ b/pkgs/by-name/ba/bashdb/bash-5-or-greater.patch @@ -0,0 +1,21 @@ +diff --git a/configure.ac b/configure.ac +index cf96d6f..3a621bc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -102,13 +102,13 @@ bash_version=`$SH_PROG --version` + [bash_major=`$SH_PROG -c 'echo ${BASH_VERSINFO[0]}'`] + [bash_minor=`$SH_PROG -c 'echo ${BASH_VERSINFO[1]}'`] + bash_5_or_greater=no +-case "${bash_major}.${bash_minor}" in +- 'OK_BASH_VERS' | '5.0' | '5.1') ++case "${bash_major}" in ++ '5') + bash_5_or_greater=yes + ;; + *) + AC_MSG_WARN([You have Bash $bash_version installed.]) +- AC_MSG_ERROR([This package is only known to work with Bash 5.0 or 5.1]) ++ AC_MSG_ERROR([This package is only known to work with Bash 5]) + ;; + esac + diff --git a/pkgs/by-name/ba/bashdb/package.nix b/pkgs/by-name/ba/bashdb/package.nix index 5ec0a5999c3f..ef2b7d9d133b 100644 --- a/pkgs/by-name/ba/bashdb/package.nix +++ b/pkgs/by-name/ba/bashdb/package.nix @@ -1,38 +1,47 @@ { lib, stdenv, - fetchurl, - fetchpatch, - makeWrapper, - python3Packages, + + fetchFromGitHub, + + autoreconfHook, + texinfo, + perl, + + python3, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "bashdb"; - version = "5.0-1.1.2"; + version = "5.2-1.1.2-unstable-2025-06-07"; - src = fetchurl { - url = "mirror://sourceforge/bashdb/${pname}-${version}.tar.bz2"; - sha256 = "sha256-MBdtKtKMWwCy4tIcXqGu+PuvQKj52fcjxnxgUx87czA="; + src = fetchFromGitHub { + owner = "Trepan-Debuggers"; + repo = "bashdb"; + rev = "7d0f9751e04fa54f48f0ab4be32ecb8030a4315d"; + sha256 = "sha256-fwxmlFC66Lv+zD632s9a44I9IEQ/82caKnQ44pdVes4="; }; patches = [ - # Enable building with bash 5.1/5.2 - # Remove with any upstream 5.1-x.y.z release - (fetchpatch { - url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/569fbb806d9ee813afa8b27d2098a44f93433922/devel/bashdb/files/patch-configure"; - sha256 = "19zfzcnxavndyn6kfxp775kjcd0gigsm4y3bnh6fz5ilhnnbbbgr"; - }) + ./bash-5-or-greater.patch ]; - patchFlags = [ "-p0" ]; nativeBuildInputs = [ - makeWrapper + autoreconfHook + texinfo # maninfo + perl # pod2man ]; - postInstall = '' - wrapProgram $out/bin/bashdb --prefix PYTHONPATH ":" "$(toPythonPath ${python3Packages.pygments})" - ''; + buildInputs = [ + # used at runtime by term-highlight.py + (python3.withPackages (ps: [ ps.pygments ])) + ]; + + configureFlags = [ + # wants to point where bash expects dbg-main + # for now point to self + "--with-dbg-main=${placeholder "out"}/share/bashdb/bashdb-main.inc" + ]; meta = { description = "Bash script debugger"; From adf3bf88f3380020b5b2fe9233ec4b37a33fc323 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Tue, 2 Sep 2025 14:27:23 +0100 Subject: [PATCH 2/4] bashdb: specify gpl2 license type as plus --- pkgs/by-name/ba/bashdb/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ba/bashdb/package.nix b/pkgs/by-name/ba/bashdb/package.nix index ef2b7d9d133b..7fd329f914d9 100644 --- a/pkgs/by-name/ba/bashdb/package.nix +++ b/pkgs/by-name/ba/bashdb/package.nix @@ -47,7 +47,7 @@ stdenv.mkDerivation { description = "Bash script debugger"; mainProgram = "bashdb"; homepage = "https://bashdb.sourceforge.net/"; - license = lib.licenses.gpl2; + license = lib.licenses.gpl2Plus; platforms = lib.platforms.linux; }; } From 03012975a9a4350a7c387e8cec1bb4fadcdbddc2 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Wed, 3 Sep 2025 13:46:01 +0100 Subject: [PATCH 3/4] bashdb: add meta details --- pkgs/by-name/ba/bashdb/package.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ba/bashdb/package.nix b/pkgs/by-name/ba/bashdb/package.nix index 7fd329f914d9..0a892efc0beb 100644 --- a/pkgs/by-name/ba/bashdb/package.nix +++ b/pkgs/by-name/ba/bashdb/package.nix @@ -44,10 +44,14 @@ stdenv.mkDerivation { ]; meta = { - description = "Bash script debugger"; - mainProgram = "bashdb"; homepage = "https://bashdb.sourceforge.net/"; + description = "A gdb-like debugger for bash"; + longDescription = '' + The Bash Debugger Project is a source-code debugger for bash that follows + the gdb command syntax. + ''; license = lib.licenses.gpl2Plus; + mainProgram = "bashdb"; platforms = lib.platforms.linux; }; } From 879fd0c1f0113ccc63a56d85e2484e508737e743 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Wed, 3 Sep 2025 13:46:45 +0100 Subject: [PATCH 4/4] bashdb: add jk to maintainers --- pkgs/by-name/ba/bashdb/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/ba/bashdb/package.nix b/pkgs/by-name/ba/bashdb/package.nix index 0a892efc0beb..978a0b3cf094 100644 --- a/pkgs/by-name/ba/bashdb/package.nix +++ b/pkgs/by-name/ba/bashdb/package.nix @@ -52,6 +52,9 @@ stdenv.mkDerivation { ''; license = lib.licenses.gpl2Plus; mainProgram = "bashdb"; + maintainers = with lib.maintainers; [ + jk + ]; platforms = lib.platforms.linux; }; }