feat(loop): Add Loop corporate messenger package
Some checks failed
CI / check (push) Has been cancelled

Add Loop v6.0.3 - a corporate messenger distributed as a pre-built x86-64 binary.
Uses autoPatchelfHook and wrapGAppsHook3 for NixOS compatibility.
This commit is contained in:
2026-05-29 19:51:21 +03:00
parent 37af68cfd0
commit 3b597af162
4 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
{ pkgs, ... }:
pkgs.callPackage ./package.nix { }

138
packages/loop/package.nix Normal file
View File

@@ -0,0 +1,138 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
makeWrapper,
wrapGAppsHook3,
gtk3,
glib,
libdrm,
mesa,
nss,
nspr,
alsa-lib,
dbus,
cups,
libxkbcommon,
xorg,
systemd,
libnotify,
libsecret, libappindicator-gtk3,
gsettings-desktop-schemas,
}:
let
version = "6.0.3";
pname = "loop";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://artifacts.wilix.dev/repository/loop-files/loop-${version}/loop-desktop-${version}-linux-x64.tar.gz";
hash = "sha256-xqbESTUYHumdVbxcaMi838wgCVBH05KfsBZB+QOwNhk=";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
wrapGAppsHook3
];
buildInputs = [
stdenv.cc.cc.lib
gtk3
glib
libdrm
mesa
nss
nspr
alsa-lib
dbus
cups
libxkbcommon
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxcb
xorg.libxshmfence
systemd
libnotify
libsecret
libappindicator-gtk3
gsettings-desktop-schemas
];
dontBuild = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p "$out/share/loop" "$out/bin" "$out/share/applications" "$out/share/icons/hicolor/256x256/apps"
cp -r . "$out/share/loop/"
# Find and symlink the main executable
if [ -f "$out/share/loop/loop" ]; then
ln -s "$out/share/loop/loop" "$out/bin/loop"
elif [ -f "$out/share/loop/Loop" ]; then
ln -s "$out/share/loop/Loop" "$out/bin/loop"
elif [ -f "$out/share/loop/loop-desktop" ]; then
ln -s "$out/share/loop/loop-desktop" "$out/bin/loop"
else
# Try to find any executable
for f in "$out/share/loop/"*; do
if [ -x "$f" ] && [ ! -d "$f" ]; then
ln -s "$f" "$out/bin/loop"
break
fi
done
fi
# Desktop entry
cat > "$out/share/applications/loop.desktop" << EOF
[Desktop Entry]
Name=Loop
Comment=Corporate messenger for your team
Exec=$out/bin/loop
Icon=loop
Terminal=false
Type=Application
Categories=Network;InstantMessaging;
EOF
# Install icon if present
if [ -f "$out/share/loop/loop-desktop.png" ]; then
cp "$out/share/loop/loop-desktop.png" "$out/share/icons/hicolor/256x256/apps/loop.png"
elif [ -f "$out/share/loop/app_icon.png" ]; then
cp "$out/share/loop/app_icon.png" "$out/share/icons/hicolor/256x256/apps/loop.png"
fi
runHook postInstall
'';
passthru = {
category = "Communication";
updateScript = [
"nix-update"
"--flake"
".#loop"
];
};
meta = with lib; {
description = "Corporate messenger for your team";
homepage = "https://wilix.dev/loop";
license = licenses.unfree;
maintainers = with maintainers; [ ];
platforms = [ "x86_64-linux" ];
mainProgram = "loop";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
};
}