1{
2 lib,
3 buildNpmPackage,
4 fetchFromGitHub,
5 perl,
6 # Needed if you want to use it for a perl script with dependencies.
7 extraPerlPackages ? [ ],
8}:
9
10let
11 perlInterpreter = perl.withPackages (
12 ps:
13 [
14 ps.PadWalker
15 ]
16 ++ extraPerlPackages
17 );
18in
19buildNpmPackage rec {
20 pname = "perl-debug-adapter";
21 version = "1.0.6";
22
23 src = fetchFromGitHub {
24 owner = "Nihilus118";
25 repo = "perl-debug-adapter";
26 rev = version;
27 hash = "sha256-IXXKhk4rzsWSPA0RT0L3CZuKlgTWtweZ4dQtruTigRs=";
28 };
29
30 npmDepsHash = "sha256-iw7+YC4qkrTVEJuZ9lnjNlUopTCp+fMNoIjFLutmrMw=";
31
32 npmBuildScript = "compile";
33
34 makeWrapperArgs = [
35 "--prefix"
36 "PATH"
37 ":"
38 (lib.makeBinPath [ perlInterpreter ])
39 ];
40 passthru = {
41 inherit perlInterpreter;
42 };
43
44 meta = {
45 description = "Debug adapter, invokes perl -d and handles communication with VS Code or other editors";
46 homepage = "https://github.com/Nihilus118/perl-debug-adapter";
47 changelog = "https://github.com/Nihilus118/perl-debug-adapter/blob/${version}/CHANGELOG.md";
48 license = lib.licenses.mit;
49 maintainers = with lib.maintainers; [ doronbehar ];
50 mainProgram = "perl-debug-adapter";
51 };
52}