@@ -0,0 +1,40 @@
1+{ stdenv, lib, fetchurl, substituteAll, PodParser }:
2+
3+stdenv.mkDerivation {
4+ pname = "multiline";
5+ version = "0.6.3";
6+
7+ src = fetchurl {
8+ url = "https://raw.githubusercontent.com/weechat/scripts/945315bed4bc2beaf1e47f9b946ffe8f638f77fe/perl/multiline.pl";
9+ sha256 = "1smialb21ny7brhij4sbw46xvsmrdv6ig2da0ip63ga2afngwsy4";
10+ };
11+
12+ dontUnpack = true;
13+ prePatch = ''
14+ cp $src multiline.pl
15+ '';
16+
17+ patches = [
18+ # The script requires a special Perl environment.
19+ (substituteAll {
20+ src = ./libpath.patch;
21+ env = PodParser;
22+ })
23+ ];
24+
25+ passthru.scripts = [ "multiline.pl" ];
26+
27+ installPhase = ''
28+ runHook preInstall
29+
30+ install -D multiline.pl $out/share/multiline.pl
31+
32+ runHook postInstall
33+ '';
34+
35+ meta = with lib; {
36+ description = "Multi-line edit box";
37+ license = licenses.gpl3Plus;
38+ maintainers = with maintainers; [ oxzi ];
39+ };
40+}