git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #111914 from oxzi/weechat-scripts-multiline

weechatScripts.multiline: init at 0.6.3

commit5e260c3c5c8862be32146f92c0541ad73d432a10 authorSandro <sandro.jaeckel@gmail.com> dateThu 18 Feb 2021, 04:02 (6 years ago) parent5db1943997e0a8
3 files changed+54−1
pkgs/applications/networking/irc/weechat/scripts/default.nix+5−1 pkgs/applications/networking/irc/weechat/scripts/multiline/default.nix+40 pkgs/applications/networking/irc/weechat/scripts/multiline/libpath.patch+9
pkgs/applications/networking/irc/weechat/scripts/default.nix+5−1
@@ -1,8 +1,12 @@
1−{ callPackage, luaPackages, python3Packages }:
1+{ callPackage, luaPackages, perlPackages, python3Packages }:
22
33{
44 colorize_nicks = callPackage ./colorize_nicks { };
55
6+ multiline = callPackage ./multiline {
7+ inherit (perlPackages) PodParser;
8+ };
9+
610 weechat-matrix-bridge = callPackage ./weechat-matrix-bridge {
711 inherit (luaPackages) cjson luaffi;
812 };
pkgs/applications/networking/irc/weechat/scripts/multiline/default.nixnew file+40
@@ -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+}
pkgs/applications/networking/irc/weechat/scripts/multiline/libpath.patchnew file+9
@@ -0,0 +1,9 @@
1+diff --git a/multiline.pl b/multiline.pl
2+index 54474d4..42fbef8 100644
3+--- a/multiline.pl
4++++ b/multiline.pl
5+@@ -1,3 +1,4 @@
6++use lib '@env@/lib/perl5/site_perl';
7+ use strict; use warnings;
8+ $INC{'Encode/ConfigLocal.pm'}=1;
9+ require Encode;