1{ lib
2, stdenv
3, fetchurl
4, fetchpatch
5, makeWrapper
6, python3Packages
7}:
8
9stdenv.mkDerivation rec {
10 pname = "bashdb";
11 version = "5.0-1.1.2";
12
13 src = fetchurl {
14 url = "mirror://sourceforge/bashdb/${pname}-${version}.tar.bz2";
15 sha256 = "sha256-MBdtKtKMWwCy4tIcXqGu+PuvQKj52fcjxnxgUx87czA=";
16 };
17
18 patches = [
19 # Enable building with bash 5.1/5.2
20 # Remove with any upstream 5.1-x.y.z release
21 (fetchpatch {
22 url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/569fbb806d9ee813afa8b27d2098a44f93433922/devel/bashdb/files/patch-configure";
23 sha256 = "19zfzcnxavndyn6kfxp775kjcd0gigsm4y3bnh6fz5ilhnnbbbgr";
24 })
25 ];
26 patchFlags = [ "-p0" ];
27
28 nativeBuildInputs = [
29 makeWrapper
30 ];
31
32 postInstall = ''
33 wrapProgram $out/bin/bashdb --prefix PYTHONPATH ":" "$(toPythonPath ${python3Packages.pygments})"
34 '';
35
36 meta = {
37 description = "Bash script debugger";
38 mainProgram = "bashdb";
39 homepage = "https://bashdb.sourceforge.net/";
40 license = lib.licenses.gpl2;
41 platforms = lib.platforms.linux;
42 };
43}