1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00

Merge pull request #111914 from oxzi/weechat-scripts-multiline

weechatScripts.multiline: init at 0.6.3
This commit is contained in:
Sandro 2021-02-18 04:02:19 +01:00 committed by GitHub
commit 5e260c3c5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 1 deletions

View file

@ -1,8 +1,12 @@
{ callPackage, luaPackages, python3Packages }:
{ callPackage, luaPackages, perlPackages, python3Packages }:
{
colorize_nicks = callPackage ./colorize_nicks { };
multiline = callPackage ./multiline {
inherit (perlPackages) PodParser;
};
weechat-matrix-bridge = callPackage ./weechat-matrix-bridge {
inherit (luaPackages) cjson luaffi;
};

View file

@ -0,0 +1,40 @@
{ stdenv, lib, fetchurl, substituteAll, PodParser }:
stdenv.mkDerivation {
pname = "multiline";
version = "0.6.3";
src = fetchurl {
url = "https://raw.githubusercontent.com/weechat/scripts/945315bed4bc2beaf1e47f9b946ffe8f638f77fe/perl/multiline.pl";
sha256 = "1smialb21ny7brhij4sbw46xvsmrdv6ig2da0ip63ga2afngwsy4";
};
dontUnpack = true;
prePatch = ''
cp $src multiline.pl
'';
patches = [
# The script requires a special Perl environment.
(substituteAll {
src = ./libpath.patch;
env = PodParser;
})
];
passthru.scripts = [ "multiline.pl" ];
installPhase = ''
runHook preInstall
install -D multiline.pl $out/share/multiline.pl
runHook postInstall
'';
meta = with lib; {
description = "Multi-line edit box";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ oxzi ];
};
}

View file

@ -0,0 +1,9 @@
diff --git a/multiline.pl b/multiline.pl
index 54474d4..42fbef8 100644
--- a/multiline.pl
+++ b/multiline.pl
@@ -1,3 +1,4 @@
+use lib '@env@/lib/perl5/site_perl';
use strict; use warnings;
$INC{'Encode/ConfigLocal.pm'}=1;
require Encode;