push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
{
stdenv,
lib,
fetchFromGitHub,
libcommuni,
qmake,
qtbase,
wrapQtAppsHook,
}:
stdenv.mkDerivation {
pname = "communi";
version = "3.6.0";
src = fetchFromGitHub {
owner = "communi";
repo = "communi-desktop";
# Without https://github.com/communi/communi-desktop/pull/146 fetching fails with
# fatal: unable to connect to github.com:
# github.com[0: 140.82.112.3]: errno=Connection timed out
rev = "5d813dc6e64a623cd5d78f024c8a0720a5155a28";
hash = "sha256-ci91Bf0EkhlPDO+NcpnMmT/vE41i5RD2mXbRAnMB++M=";
fetchSubmodules = true;
};
nativeBuildInputs = [
qmake
wrapQtAppsHook
];
buildInputs = [
libcommuni
qtbase
];
# libCommuni.dylib is installed in $out/Applications/Communi.app/Contents/Frameworks/ on Darwin
# Wrapper hook thinks it's a binary because it's in $out/Applications, wraps it with a shell script
# So we manually call the wrapper script on just the binary
dontWrapQtApps = stdenv.hostPlatform.isDarwin;
preConfigure = ''
export QMAKEFEATURES=${libcommuni}/features
'';
qmakeFlags = [
"COMMUNI_INSTALL_PREFIX=${placeholder "out"}"
"COMMUNI_INSTALL_PLUGINS=${placeholder "out"}/lib/communi/plugins"
"COMMUNI_INSTALL_ICONS=${placeholder "out"}/share/icons/hicolor"
"COMMUNI_INSTALL_DESKTOP=${placeholder "out"}/share/applications"
"COMMUNI_INSTALL_THEMES=${placeholder "out"}/share/communi/themes"
"COMMUNI_INSTALL_BINS=${placeholder "out"}/${
if stdenv.hostPlatform.isDarwin then "Applications" else "bin"
}"
];
postInstall =
if stdenv.hostPlatform.isDarwin then
''
# Nix qmake does not add the bundle rpath by default.
install_name_tool \
-add_rpath @executable_path/../Frameworks \
$out/Applications/Communi.app/Contents/MacOS/Communi
# Do not remove until wrapQtAppsHook doesn't wrap dylibs in app bundles anymore
wrapQtApp $out/Applications/Communi.app/Contents/MacOS/Communi
''
else
''
substituteInPlace "$out/share/applications/communi.desktop" \
--replace "/usr/bin" "$out/bin"
'';
preFixup = ''
rm -rf lib
'';
meta = with lib; {
description = "Simple and elegant cross-platform IRC client";
mainProgram = "communi";
homepage = "https://github.com/communi/communi-desktop";
license = licenses.bsd3;
maintainers = with maintainers; [ hrdinka ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "ii";
version = "2.0";
src = fetchurl {
url = "https://dl.suckless.org/tools/${pname}-${version}.tar.gz";
sha256 = "sha256-T2evzSCMB5ObiKrb8hSXpwKtCgf5tabOhh+fOf/lQls=";
};
makeFlags = [ "CC:=$(CC)" ];
installFlags = [ "PREFIX=$(out)" ];
meta = {
homepage = "https://tools.suckless.org/ii/";
license = lib.licenses.mit;
description = "Irc it, simple FIFO based irc client";
mainProgram = "ii";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
mkDerivation,
fetchFromGitHub,
qtbase,
qtmultimedia,
qtsvg,
qtx11extras,
pkg-config,
cmake,
gettext,
}:
mkDerivation {
pname = "kvirc";
version = "2022-06-29";
src = fetchFromGitHub {
owner = "kvirc";
repo = "KVIrc";
rev = "eb3fdd6b1d824f148fd6e582852dcba77fc9a271";
sha256 = "sha256-RT5UobpMt/vBLgWur1TkodS3dMyIWQkDPiBYCYx/FI4=";
};
buildInputs = [
qtbase
qtmultimedia
qtsvg
qtx11extras
];
nativeBuildInputs = [
pkg-config
cmake
gettext
];
meta = with lib; {
description = "Advanced IRC Client";
homepage = "https://www.kvirc.net/";
license = licenses.gpl2;
maintainers = [ maintainers.suhr ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,134 @@
{
monolithic ? true, # build monolithic Quassel
enableDaemon ? false, # build Quassel daemon
client ? false, # build Quassel client
tag ? "-kf5", # tag added to the package name
static ? false, # link statically
lib,
stdenv,
fetchFromGitHub,
cmake,
makeWrapper,
dconf,
mkDerivation,
qtbase,
boost,
zlib,
qtscript,
phonon,
libdbusmenu,
qca-qt5,
openldap,
withKDE ? true, # enable KDE integration
extra-cmake-modules,
kconfigwidgets,
kcoreaddons,
knotifications,
knotifyconfig,
ktextwidgets,
kwidgetsaddons,
kxmlgui,
}:
let
buildClient = monolithic || client;
buildCore = monolithic || enableDaemon;
in
assert monolithic -> !client && !enableDaemon;
assert client || enableDaemon -> !monolithic;
assert !buildClient -> !withKDE; # KDE is used by the client only
let
edf = flag: feature: [ ("-D" + feature + (if flag then "=ON" else "=OFF")) ];
in
(if !buildClient then stdenv.mkDerivation else mkDerivation) rec {
pname = "quassel${tag}";
version = "0.14.0";
src = fetchFromGitHub {
owner = "quassel";
repo = "quassel";
rev = version;
sha256 = "sha256-eulhNcyCmy9ryietOhT2yVJeJH+MMZRbTUo2XuTy9qU=";
};
# Prevent ``undefined reference to `qt_version_tag''' in SSL check
env.NIX_CFLAGS_COMPILE = "-DQT_NO_VERSION_TAGGING=1";
nativeBuildInputs = [
cmake
makeWrapper
];
buildInputs = [
qtbase
boost
zlib
]
++ lib.optionals buildCore [
qtscript
qca-qt5
openldap
]
++ lib.optionals buildClient [
libdbusmenu
phonon
]
++ lib.optionals (buildClient && withKDE) [
extra-cmake-modules
kconfigwidgets
kcoreaddons
knotifications
knotifyconfig
ktextwidgets
kwidgetsaddons
kxmlgui
];
cmakeFlags = [
"-DEMBED_DATA=OFF"
"-DUSE_QT5=ON"
]
++ edf static "STATIC"
++ edf monolithic "WANT_MONO"
++ edf enableDaemon "WANT_CORE"
++ edf enableDaemon "WITH_LDAP"
++ edf client "WANT_QTCLIENT"
++ edf withKDE "WITH_KDE";
dontWrapQtApps = true;
postFixup =
lib.optionalString enableDaemon ''
wrapProgram "$out/bin/quasselcore" --suffix PATH : "${qtbase.bin}/bin"
''
+ lib.optionalString buildClient ''
wrapQtApp "$out/bin/quassel${lib.optionalString client "client"}" \
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules"
'';
meta = with lib; {
homepage = "https://quassel-irc.org/";
description = "Qt/KDE distributed IRC client supporting a remote daemon";
longDescription = ''
Quassel IRC is a cross-platform, distributed IRC client,
meaning that one (or multiple) client(s) can attach to
and detach from a central core -- much like the popular
combination of screen and a text-based IRC client such
as WeeChat, but graphical (based on Qt4/KDE4 or Qt5/KF5).
'';
license = licenses.gpl3;
maintainers = with maintainers; [ ttuegel ];
mainProgram =
if monolithic then
"quassel"
else if buildClient then
"quasselclient"
else
"quasselcore";
inherit (qtbase.meta) platforms;
};
}

View File

@@ -0,0 +1,209 @@
{
stdenv,
fetchurl,
lib,
ncurses,
openssl,
aspell,
cjson,
gnutls,
gettext,
zlib,
curl,
pkg-config,
libgcrypt,
cmake,
libresolv,
libiconv,
asciidoctor, # manpages
enableTests ? !stdenv.hostPlatform.isDarwin,
cpputest,
guileSupport ? true,
guile,
luaSupport ? true,
lua5,
perlSupport ? true,
perl,
pythonSupport ? true,
python3Packages,
rubySupport ? true,
ruby,
tclSupport ? true,
tcl,
phpSupport ? !stdenv.hostPlatform.isDarwin,
php,
systemdLibs,
libxml2,
pcre2,
libargon2,
extraBuildInputs ? [ ],
writeScript,
versionCheckHook,
}:
let
inherit (python3Packages) python;
php-embed = php.override {
embedSupport = true;
apxs2Support = false;
};
plugins = [
{
name = "perl";
enabled = perlSupport;
cmakeFlag = "ENABLE_PERL";
buildInputs = [ perl ];
}
{
name = "tcl";
enabled = tclSupport;
cmakeFlag = "ENABLE_TCL";
buildInputs = [ tcl ];
}
{
name = "ruby";
enabled = rubySupport;
cmakeFlag = "ENABLE_RUBY";
buildInputs = [ ruby ];
}
{
name = "guile";
enabled = guileSupport;
cmakeFlag = "ENABLE_GUILE";
buildInputs = [ guile ];
}
{
name = "lua";
enabled = luaSupport;
cmakeFlag = "ENABLE_LUA";
buildInputs = [ lua5 ];
}
{
name = "python";
enabled = pythonSupport;
cmakeFlag = "ENABLE_PYTHON3";
buildInputs = [ python ];
}
{
name = "php";
enabled = phpSupport;
cmakeFlag = "ENABLE_PHP";
buildInputs = [
php-embed.unwrapped.dev
libxml2
pcre2
libargon2
]
++ lib.optionals stdenv.hostPlatform.isLinux [ systemdLibs ];
}
];
enabledPlugins = builtins.filter (p: p.enabled) plugins;
in
assert lib.all (p: p.enabled -> !(builtins.elem null p.buildInputs)) plugins;
stdenv.mkDerivation rec {
pname = "weechat";
version = "4.7.1";
src = fetchurl {
url = "https://weechat.org/files/src/weechat-${version}.tar.xz";
hash = "sha256-6D+3HKJRxd10vZxaa9P4XcLrjs7AlV9DwH8+CRHtt9M=";
};
# Why is this needed? https://github.com/weechat/weechat/issues/2031
patches = lib.optionals gettext.gettextNeedsLdflags [
./gettext-intl.patch
];
outputs = [
"out"
"man"
]
++ map (p: p.name) enabledPlugins;
cmakeFlags = [
(lib.cmakeBool "ENABLE_MAN" true)
(lib.cmakeBool "ENABLE_DOC" true)
(lib.cmakeBool "ENABLE_DOC_INCOMPLETE" true)
(lib.cmakeBool "ENABLE_TESTS" enableTests)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "ICONV_LIBRARY" "${libiconv}/lib/libiconv.dylib")
]
++ map (p: lib.cmakeBool p.cmakeFlag p.enabled) plugins;
nativeBuildInputs = [
cmake
pkg-config
asciidoctor
]
++ lib.optionals enableTests [ cpputest ];
buildInputs = [
ncurses
openssl
aspell
cjson
gnutls
gettext
zlib
curl
libgcrypt
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libresolv
]
++ lib.concatMap (p: p.buildInputs) enabledPlugins
++ extraBuildInputs;
hardeningEnable = [ "pie" ];
env.NIX_CFLAGS_COMPILE =
"-I${python}/include/${python.libPrefix}"
# Fix '_res_9_init: undefined symbol' error
+ (lib.optionalString stdenv.hostPlatform.isDarwin "-DBIND_8_COMPAT=1 -lresolv");
postInstall = ''
for p in ${lib.concatMapStringsSep " " (p: p.name) enabledPlugins}; do
from=$out/lib/weechat/plugins/$p.so
to=''${!p}/lib/weechat/plugins/$p.so
mkdir -p $(dirname $to)
mv $from $to
done
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = writeScript "update-weechat" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils gawk git gnugrep common-updater-scripts
set -eu -o pipefail
version="$(git ls-remote --refs https://github.com/weechat/weechat | \
awk '{ print $2 }' | \
grep "refs/tags/v" | \
sed -E -e 's,refs/tags/v(.*)$,\1,' | \
sort --version-sort --reverse | \
head -n1)"
update-source-version weechat-unwrapped "$version"
'';
meta = {
homepage = "https://weechat.org/";
changelog = "https://github.com/weechat/weechat/releases/tag/v${version}";
description = "Fast, light and extensible chat client";
longDescription = ''
You can find more documentation as to how to customize this package
(e.g. adding python modules for scripts that would require them, etc.)
on https://nixos.org/nixpkgs/manual/#sec-weechat .
'';
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ ncfavier ];
mainProgram = "weechat";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/cmake/FindGettext.cmake b/cmake/FindGettext.cmake
index 358734688..ffcbf7ef4 100644
--- a/cmake/FindGettext.cmake
+++ b/cmake/FindGettext.cmake
@@ -42,6 +42,7 @@ find_path(LIBINTL_INCLUDE
)
set(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
+set(CMAKE_REQUIRED_FLAGS "-lintl")
check_include_files(libintl.h HAVE_LIBINTL_H)

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchurl,
weechat,
}:
stdenv.mkDerivation {
pname = "weechat-autosort";
version = "3.10";
src = fetchurl {
url = "https://github.com/weechat/scripts/raw/13aef991ca879fc0ff116874a45b09bc2db10607/python/autosort.py";
hash = "sha256-xuZUssjGd0l7lCx96d0V8LL+0O3zIxYlWMoDsdzwMf4=";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share
cp $src $out/share/autosort.py
'';
passthru = {
scripts = [ "autosort.py" ];
};
meta = with lib; {
inherit (weechat.meta) platforms;
description = "autosort automatically keeps your buffers sorted and grouped by server";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ flokli ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
weechat,
}:
stdenv.mkDerivation {
pname = "buffer_autoset";
version = "1.2";
src = fetchurl {
url = "https://raw.githubusercontent.com/weechat/scripts/2b308b44df39ba6563d02b2bcd40c384ec2777dc/python/buffer_autoset.py";
sha256 = "0csl3sfpijdbq1j6wabx347lvn91a24a2jfx5b5pspfxz7gixli1";
};
dontUnpack = true;
passthru.scripts = [ "buffer_autoset.py" ];
installPhase = ''
install -D $src $out/share/buffer_autoset.py
'';
meta = with lib; {
inherit (weechat.meta) platforms;
description = "WeeChat script which auto-set buffer properties when a buffer is opened";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ govanify ];
};
}

View File

@@ -0,0 +1,34 @@
{
stdenv,
lib,
fetchurl,
weechat,
}:
stdenv.mkDerivation {
pname = "weechat-colorize_nicks";
version = "27";
src = fetchurl {
url = "https://github.com/weechat/scripts/raw/bc8a9051800779a036ba11689a277cd5f03657b2/python/colorize_nicks.py";
sha256 = "0hiay88vvy171jiq6ahflm0ipb7sslfxwhmmm8psv6qk19rv2sxs";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share
cp $src $out/share/colorize_nicks.py
'';
passthru = {
scripts = [ "colorize_nicks.py" ];
};
meta = with lib; {
inherit (weechat.meta) platforms;
description = "Use the weechat nick colors in the chat area";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ qyliss ];
};
}

View File

@@ -0,0 +1,44 @@
{
callPackage,
luaPackages,
perlPackages,
python3Packages,
}:
{
autosort = callPackage ./autosort { };
colorize_nicks = callPackage ./colorize_nicks { };
edit = callPackage ./edit { };
multiline = callPackage ./multiline {
inherit (perlPackages) PodParser;
};
url_hint = callPackage ./url_hint { };
weechat-grep = callPackage ./weechat-grep { };
weechat-matrix-bridge = callPackage ./weechat-matrix-bridge {
inherit (luaPackages) cjson luaffi;
};
weechat-matrix = python3Packages.callPackage ./weechat-matrix { };
weechat-notify-send = python3Packages.callPackage ./weechat-notify-send { };
wee-slack = callPackage ./wee-slack { };
weechat-autosort = callPackage ./weechat-autosort { };
weechat-otr = callPackage ./weechat-otr { };
weechat-go = callPackage ./weechat-go { };
buffer_autoset = callPackage ./buffer_autoset { };
highmon = callPackage ./highmon { };
zncplayback = callPackage ./zncplayback { };
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
weechat,
}:
stdenv.mkDerivation rec {
pname = "edit-weechat";
version = "1.0.2";
src = fetchFromGitHub {
owner = "keith";
repo = "edit-weechat";
rev = version;
sha256 = "1s42r0l0xkhlp6rbc23cm4vlda91il6cg53w33hqfhd2wz91s66w";
};
dontBuild = true;
passthru.scripts = [ "edit.py" ];
installPhase = ''
runHook preInstall
install -D edit.py $out/share/edit.py
runHook postInstall
'';
meta = with lib; {
inherit (weechat.meta) platforms;
description = "This simple weechat plugin allows you to compose messages in your $EDITOR";
license = licenses.mit;
maintainers = with maintainers; [ eraserhd ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchurl,
weechat,
}:
stdenv.mkDerivation {
pname = "highmon";
version = "2.7";
src = fetchurl {
url = "https://raw.githubusercontent.com/KenjiE20/highmon/182e67d070c75efc81999e68c2ac7fdfe44d2872/highmon.pl";
sha256 = "1vvgzscb12l3cp2nq954fx6j3awvpjsb0nqylal51ps9cq9a3wir";
};
dontUnpack = true;
passthru.scripts = [ "highmon.pl" ];
installPhase = ''
runHook preInstall
install -D $src $out/share/highmon.pl
runHook postInstall
'';
meta = with lib; {
inherit (weechat.meta) platforms;
homepage = "https://github.com/KenjiE20/highmon/";
description = "WeeChat script that adds 'Highlight Monitor'";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ govanify ];
};
}

View File

@@ -0,0 +1,45 @@
{
stdenv,
lib,
fetchurl,
replaceVars,
PodParser,
}:
stdenv.mkDerivation {
pname = "multiline";
version = "0.6.4";
src = fetchurl {
url = "https://raw.githubusercontent.com/weechat/scripts/5f073d966e98d54344a91be4f5afc0ec9e2697dc/perl/multiline.pl";
sha256 = "sha256-TXbU2Q7Tm8iTwOQqrWpqHXuKrjoBFLyUWRsH+TsR9Lo=";
};
dontUnpack = true;
prePatch = ''
cp $src multiline.pl
'';
patches = [
# The script requires a special Perl environment.
(replaceVars ./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;

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
weechat,
}:
stdenv.mkDerivation {
pname = "url_hint";
version = "0.8";
src = fetchurl {
url = "https://raw.githubusercontent.com/weechat/scripts/10671d785ea3f9619d0afd0d7a1158bfa4ee3938/python/url_hint.py";
sha256 = "0aw59kq74yqh0qbdkldfl6l83d0bz833232xr2w4741szck43kss";
};
dontUnpack = true;
passthru.scripts = [ "url_hint.py" ];
installPhase = ''
runHook preInstall
install -D $src $out/share/url_hint.py
runHook postInstall
'';
meta = with lib; {
inherit (weechat.meta) platforms;
description = "WeeChat URL opening script";
license = licenses.mit;
maintainers = with maintainers; [ eraserhd ];
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
replaceVars,
buildEnv,
fetchFromGitHub,
python3Packages,
}:
stdenv.mkDerivation rec {
pname = "wee-slack";
version = "2.11.0";
src = fetchFromGitHub {
repo = "wee-slack";
owner = "wee-slack";
rev = "v${version}";
sha256 = "sha256-xQO/yi4pJSnO/ldzVQkC7UhAfpy57xzO58NV7KZm4E8=";
};
patches = [
(replaceVars ./libpath.patch {
env = "${
buildEnv {
name = "wee-slack-env";
paths = with python3Packages; [
websocket-client
six
];
}
}/${python3Packages.python.sitePackages}";
})
./load_weemoji_path.patch
];
postPatch = ''
substituteInPlace wee_slack.py --subst-var out
'';
passthru.scripts = [ "wee_slack.py" ];
installPhase = ''
mkdir -p $out/share
cp wee_slack.py $out/share/wee_slack.py
install -D -m 0444 weemoji.json $out/share/wee-slack/weemoji.json
'';
meta = with lib; {
homepage = "https://github.com/wee-slack/wee-slack";
license = licenses.mit;
maintainers = [ ];
description = ''
A WeeChat plugin for Slack.com. Synchronizes read markers, provides typing notification, search, etc..
'';
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/wee_slack.py b/wee_slack.py
index e4716b4..f673b7c 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -31,6 +31,8 @@ import string
# See https://github.com/numpy/numpy/issues/11925
sys.modules["numpy"] = None
+sys.path.append('@env@')
+
from websocket import ( # noqa: E402
ABNF,
create_connection,

View File

@@ -0,0 +1,25 @@
diff --git a/wee_slack.py b/wee_slack.py
index e4716b4..ffd122d 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -6092,19 +6092,7 @@ def create_slack_debug_buffer():
def load_emoji():
try:
- weechat_dir = w.info_get("weechat_data_dir", "") or w.info_get(
- "weechat_dir", ""
- )
- weechat_sharedir = w.info_get("weechat_sharedir", "")
- local_weemoji, global_weemoji = (
- "{}/weemoji.json".format(path) for path in (weechat_dir, weechat_sharedir)
- )
- path = (
- global_weemoji
- if os.path.exists(global_weemoji) and not os.path.exists(local_weemoji)
- else local_weemoji
- )
- with open(path, "r") as ef:
+ with open("@out@/share/wee-slack/weemoji.json", "r") as ef:
emojis = json.loads(ef.read())
if "emoji" in emojis:
print_error(

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "weechat-autosort";
version = "3.9";
src = fetchFromGitHub {
owner = "de-vri-es";
repo = "weechat-autosort";
rev = "d62fa8633015ebc2676060fcdae88c402977be46";
sha256 = "sha256-doYDRIWiuHam2i3r3J3BZuWEhopoN4jms/xPXGyypok=";
};
passthru.scripts = [ "autosort.py" ];
installPhase = ''
install -D autosort.py $out/share/autosort.py
'';
meta = with lib; {
description = "Autosort is a weechat script to automatically or manually keep your buffers sorted";
homepage = "https://github.com/de-vri-es/weechat-autosort";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ flokli ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
weechat,
}:
stdenv.mkDerivation {
pname = "weechat-go";
version = "2.7";
src = fetchurl {
url = "https://github.com/weechat/scripts/raw/414cff3ee605ba204b607742430a21443c035b08/python/go.py";
sha256 = "0bnbfpj1qg4yzwbikh1aw5ajc8l44lkb0y0m6mz8grpf5bxk5cwm";
};
dontUnpack = true;
passthru.scripts = [ "go.py" ];
installPhase = ''
install -D $src $out/share/go.py
'';
meta = with lib; {
inherit (weechat.meta) platforms;
description = "WeeChat script to quickly jump to different buffers";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ govanify ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation {
pname = "weechat-grep";
version = "0.8.5";
src = fetchurl {
url = "https://github.com/weechat/scripts/raw/5ee93d56f371c829d2798a5446a14292c180f70b/python/grep.py";
sha256 = "sha256-EVcoxjTTjXOYD8DppD+IULxpKerEdolmlgphrulFGC0=";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share
cp $src $out/share/grep.py
'';
passthru = {
scripts = [ "grep.py" ];
};
meta = with lib; {
description = "Search in Weechat buffers and logs (for Weechat 0.3.*)";
homepage = "https://github.com/weechat/scripts/blob/master/python/grep.py";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ flokli ];
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
curl,
fetchFromGitHub,
cjson,
olm,
luaffi,
}:
stdenv.mkDerivation {
pname = "weechat-matrix-bridge";
version = "unstable-2018-11-19";
src = fetchFromGitHub {
owner = "torhve";
repo = "weechat-matrix-protocol-script";
rev = "8d32e90d864a8f3f09ecc2857cd5dd6e39a8c3f7";
sha256 = "0qqd6qmkrdc0r3rnl53c3yp93fbcz7d3mdw3vq5gmdqxyym4s9lj";
};
patches = [
./library-path.patch
];
buildInputs = [
curl
cjson
olm
luaffi
];
postPatch = ''
substituteInPlace matrix.lua \
--replace "/usr/bin/curl" "${curl}/bin/curl" \
--replace "__NIX_LIB_PATH__" "$out/lib/?.so" \
--replace "__NIX_OLM_PATH__" "$out/share/?.lua"
substituteInPlace olm.lua \
--replace "__NIX_LIB_PATH__" "$out/lib/?.so"
'';
passthru.scripts = [ "matrix.lua" ];
installPhase = ''
mkdir -p $out/{share,lib}
cp {matrix.lua,olm.lua} $out/share
cp ${cjson}/lib/lua/${cjson.lua.luaversion}/cjson.so $out/lib/cjson.so
cp ${olm}/lib/libolm.so $out/lib/libolm.so
cp ${luaffi}/lib/lua/${luaffi.lua.luaversion}/ffi.so $out/lib/ffi.so
'';
meta = with lib; {
description = "WeeChat script in Lua that implements the matrix.org chat protocol";
homepage = "https://github.com/torhve/weechat-matrix-protocol-script";
maintainers = [ ];
license = licenses.mit; # see https://github.com/torhve/weechat-matrix-protocol-script/blob/0052e7275ae149dc5241226391c9b1889ecc3c6b/matrix.lua#L53
platforms = platforms.unix;
# As of 2019-06-30, all of the dependencies are available on macOS but the
# package itself does not build.
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,28 @@
diff --git a/matrix.lua b/matrix.lua
index b79f500..32b37a2 100644
--- a/matrix.lua
+++ b/matrix.lua
@@ -43,6 +43,9 @@ This script maps this as follows:
]]
+package.cpath = package.cpath .. ";__NIX_LIB_PATH__"
+package.path = package.path .. ";__NIX_OLM_PATH__"
+
local json = require 'cjson' -- apt-get install lua-cjson
local olmstatus, olm = pcall(require, 'olm') -- LuaJIT olm FFI binding ln -s ~/olm/olm.lua /usr/local/share/lua/5.1
local w = weechat
diff --git a/olm.lua b/olm.lua
index 114649c..4828371 100644
--- a/olm.lua
+++ b/olm.lua
@@ -17,6 +17,9 @@
* limitations under the License.
*/
--]]
+
+package.cpath = package.cpath .. ";__NIX_LIB_PATH__"
+
local ffi = require'ffi'
ffi.cdef[[

View File

@@ -0,0 +1,108 @@
{
buildPythonPackage,
lib,
python,
fetchFromGitHub,
fetchpatch,
pyopenssl,
webcolors,
future,
atomicwrites,
attrs,
logbook,
pygments,
matrix-nio,
aiohttp,
requests,
}:
let
scriptPython = python.withPackages (
ps: with ps; [
aiohttp
requests
python-magic
]
);
version = "0.3.0";
in
buildPythonPackage {
pname = "weechat-matrix";
inherit version;
src = fetchFromGitHub {
owner = "poljar";
repo = "weechat-matrix";
rev = version;
hash = "sha256-o4kgneszVLENG167nWnk2FxM+PsMzi+PSyMUMIktZcc=";
};
patches = [
# server: remove set_npn_protocols()
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/poljar/weechat-matrix/pull/309.patch";
hash = "sha256-Grdht+TOFvCYRpL7uhPivqL7YzLoNVF3iQNHgbv1Te0=";
})
# Fix compatibility with matrix-nio 0.21
(fetchpatch {
url = "https://github.com/poljar/weechat-matrix/commit/feae9fda26ea9de98da9cd6733980a203115537e.patch";
hash = "sha256-MAfxJ85dqz5PNwp/GJdHA2VvXVdWh+Ayx5g0oHiw9rs=";
includes = [ "matrix/config.py" ];
})
];
propagatedBuildInputs = [
pyopenssl
webcolors
future
atomicwrites
attrs
logbook
pygments
(matrix-nio.override { withOlm = true; })
aiohttp
requests
];
passthru.scripts = [ "matrix.py" ];
dontBuild = true;
doCheck = false;
format = "other";
installPhase = ''
mkdir -p $out/share $out/bin
cp main.py $out/share/matrix.py
cp contrib/matrix_upload.py $out/bin/matrix_upload
cp contrib/matrix_decrypt.py $out/bin/matrix_decrypt
cp contrib/matrix_sso_helper.py $out/bin/matrix_sso_helper
substituteInPlace $out/bin/matrix_upload \
--replace-fail '/usr/bin/env -S python3' '${scriptPython}/bin/python'
substituteInPlace $out/bin/matrix_sso_helper \
--replace-fail '/usr/bin/env -S python3' '${scriptPython}/bin/python'
substituteInPlace $out/bin/matrix_decrypt \
--replace-fail '/usr/bin/env python3' '${scriptPython}/bin/python'
mkdir -p $out/${python.sitePackages}
cp -r matrix $out/${python.sitePackages}/matrix
'';
dontPatchShebangs = true;
postFixup = ''
addToSearchPath program_PYTHONPATH $out/${python.sitePackages}
patchPythonScript $out/share/matrix.py
substituteInPlace $out/${python.sitePackages}/matrix/server.py --replace-fail \"matrix_sso_helper\" \"$out/bin/matrix_sso_helper\"
substituteInPlace $out/${python.sitePackages}/matrix/uploads.py --replace-fail \"matrix_upload\" \"$out/bin/matrix_upload\"
'';
meta = with lib; {
description = "Python plugin for Weechat that lets Weechat communicate over the Matrix protocol";
homepage = "https://github.com/poljar/weechat-matrix";
license = licenses.isc;
platforms = platforms.unix;
maintainers = with maintainers; [ tilpner ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
libnotify,
}:
stdenv.mkDerivation rec {
pname = "weechat-notify-send";
version = "0.10";
src = fetchFromGitHub {
owner = "s3rvac";
repo = "weechat-notify-send";
rev = "v${version}";
sha256 = "sha256-7uw0IdRSxhPrLqdgECKB9eOrtFj+2HTILBhakKiRuNQ=";
};
passthru.scripts = [ "notify_send.py" ];
dontBuild = true;
doCheck = false;
installPhase = ''
install -D notify_send.py $out/share/notify_send.py
substituteInPlace $out/share/notify_send.py \
--replace "'notify-send'" "'${libnotify}/bin/notify-send'"
'';
meta = with lib; {
description = "WeeChat script that sends highlight and message notifications through notify-send";
homepage = "https://github.com/s3rvac/weechat-notify-send";
license = licenses.mit;
maintainers = with maintainers; [ tobim ];
};
}

View File

@@ -0,0 +1,92 @@
{
lib,
stdenv,
replaceVars,
buildEnv,
fetchgit,
fetchFromGitHub,
python3Packages,
gmp,
}:
let
# pure-python-otr (potr) requires an older version of pycrypto, which is
# not compatible with pycryptodome. Therefore, the latest patched version
# of pycrypto will be fetched from the Debian project.
# https://security-tracker.debian.org/tracker/source-package/python-crypto
pycrypto = python3Packages.buildPythonPackage rec {
pname = "pycrypto";
version = "2.6.1-13.1";
format = "setuptools";
src = fetchgit {
url = "https://salsa.debian.org/sramacher/python-crypto.git";
rev = "debian/${version}";
sha256 = "1mahqmlgilgk0rn5hfkhza7kscfm7agdakkb6rqnif9g0qp3s52f";
};
postPatch = ''
for p in debian/patches/*.patch; do
patch -p1 < "$p"
done
'';
buildInputs = [ gmp ];
# Tests are relying on old Python 2 modules.
doCheck = false;
preConfigure = ''
sed -i 's,/usr/include,/no-such-dir,' configure
sed -i "s!,'/usr/include/'!!" setup.py
'';
};
potr = python3Packages.potr.overridePythonAttrs (oldAttrs: {
propagatedBuildInputs = [ pycrypto ];
});
in
stdenv.mkDerivation rec {
pname = "weechat-otr";
version = "1.9.2";
src = fetchFromGitHub {
repo = "weechat-otr";
owner = "mmb";
rev = "v${version}";
sha256 = "1lngv98y6883vk8z2628cl4d5y8jxy39w8245gjdvshl8g18k5s2";
};
patches = [
(replaceVars ./libpath.patch {
env = "${
buildEnv {
name = "weechat-otr-env";
paths = [
potr
pycrypto
];
}
}/${python3Packages.python.sitePackages}";
})
];
passthru.scripts = [ "weechat_otr.py" ];
installPhase = ''
mkdir -p $out/share
cp weechat_otr.py $out/share/weechat_otr.py
'';
meta = with lib; {
homepage = "https://github.com/mmb/weechat-otr";
license = licenses.gpl3;
maintainers = with maintainers; [ oxzi ];
description = "WeeChat script for Off-the-Record messaging";
knownVulnerabilities = [
"There is no upstream release since 2018-03."
"Utilizes deprecated and vulnerable pycrypto library with Debian patches from 2020-04."
];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/weechat_otr.py b/weechat_otr.py
index 0ccfb35..c42bebf 100644
--- a/weechat_otr.py
+++ b/weechat_otr.py
@@ -41,6 +41,8 @@ import shlex
import shutil
import sys
+sys.path.append('@env@')
+
import potr
import weechat

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation {
pname = "weechat-zncplayback";
version = "0.2.1";
src = fetchurl {
url = "https://github.com/weechat/scripts/raw/bcc9643136addd2cd68ac957dd64e336e4f88aa1/python/zncplayback.py";
sha256 = "1k32p6naxg40g664ip48zvm61xza7l9az3v3rawmjw97i0mwz7y3";
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/share
cp $src $out/share/zncplayback.py
'';
passthru = {
scripts = [ "zncplayback.py" ];
};
meta = with lib; {
description = "Add support for the ZNC Playback module";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ qyliss ];
};
}

View File

@@ -0,0 +1,129 @@
{
lib,
runCommand,
writeScriptBin,
buildEnv,
python3Packages,
perlPackages,
runtimeShell,
}:
weechat:
let
wrapper =
{
installManPages ? true,
configure ?
{ availablePlugins, ... }:
{
# Do not include PHP by default, because it bloats the closure, doesn't
# build on Darwin, and there are no official PHP scripts.
plugins = builtins.attrValues (removeAttrs availablePlugins [ "php" ]);
},
}:
let
perlInterpreter = perlPackages.perl;
availablePlugins =
let
simplePlugin = name: { pluginFile = "${weechat.${name}}/lib/weechat/plugins/${name}.so"; };
in
rec {
python = (simplePlugin "python") // {
extraEnv = ''
export PATH="${python3Packages.python}/bin:$PATH"
'';
withPackages =
pkgsFun:
(
python
// {
extraEnv = ''
${python.extraEnv}
export PYTHONHOME="${python3Packages.python.withPackages pkgsFun}"
'';
}
);
};
perl = (simplePlugin "perl") // {
extraEnv = ''
export PATH="${perlInterpreter}/bin:$PATH"
'';
withPackages =
pkgsFun:
(
perl
// {
extraEnv = ''
${perl.extraEnv}
export PERL5LIB=${perlPackages.makeFullPerlPath (pkgsFun perlPackages)}
'';
}
);
};
tcl = simplePlugin "tcl";
ruby = simplePlugin "ruby";
guile = simplePlugin "guile";
lua = simplePlugin "lua";
php = simplePlugin "php";
};
config = configure { inherit availablePlugins; };
plugins = config.plugins or (builtins.attrValues availablePlugins);
pluginsDir = runCommand "weechat-plugins" { } ''
mkdir -p $out/plugins
for plugin in ${lib.concatMapStringsSep " " (p: p.pluginFile) plugins} ; do
ln -s $plugin $out/plugins
done
'';
init =
let
init = builtins.replaceStrings [ "\n" ] [ ";" ] (config.init or "");
mkScript = drv: lib.forEach drv.scripts (script: "/script load ${drv}/share/${script}");
scripts = builtins.concatStringsSep ";" (
lib.foldl (scripts: drv: scripts ++ mkScript drv) [ ] (config.scripts or [ ])
);
in
"${scripts};${init}";
mkWeechat =
bin:
(writeScriptBin bin ''
#!${runtimeShell}
export WEECHAT_EXTRA_LIBDIR=${pluginsDir}
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init}
'')
// {
inherit (weechat) name man;
unwrapped = weechat;
outputs = [
"out"
"man"
];
};
in
buildEnv {
name = "weechat-bin-env-${weechat.version}";
extraOutputsToInstall = lib.optionals installManPages [ "man" ];
paths = [
(mkWeechat "weechat")
(mkWeechat "weechat-headless")
(runCommand "weechat-out-except-bin" { } ''
mkdir $out
ln -sf ${weechat}/include $out/include
ln -sf ${weechat}/lib $out/lib
ln -sf ${weechat}/share $out/share
'')
];
meta = removeAttrs weechat.meta [ "outputsToInstall" ];
};
in
lib.makeOverridable wrapper