remove equibop pkgs overlay as it has been merged

This commit is contained in:
2026-11-20 16:39:55 +01:00
parent c6d25a4819
commit a63556eb7b
4 changed files with 0 additions and 256 deletions
-8
View File
@@ -1,8 +0,0 @@
let
flake = builtins.getFlake (toString ./.);
pkgs = import flake.inputs.nixpkgs-new {
system = "aarch64-linux";
};
in
pkgs.callPackage ./pkgs/equibop/package.nix { }
-6
View File
@@ -89,12 +89,6 @@
equibop
];
nixpkgs.overlays = [
(final: prev: {
equibop = nixpkgs-new.legacyPackages.${system}.callPackage ../../pkgs/equibop/package.nix { };
})
];
fonts.packages = with pkgs; [
nerd-fonts.caskaydia-mono
nerd-fonts.symbols-only
-60
View File
@@ -1,60 +0,0 @@
# fixed output derrivation adapted from
# https://github.com/NixOS/nixpkgs/blob/28c3f83a9a77e3ada57afb71cc4052d2c435597a/pkgs/by-name/op/opencode/package.nix#L59-L122
{
lib,
stdenvNoCC,
equibop,
bun,
writableTmpDirAsHomeHook,
}:
stdenvNoCC.mkDerivation {
inherit (equibop) version src;
pname = equibop.pname + "-modules";
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
"GIT_PROXY_COMMAND"
"SOCKS_SERVER"
];
nativeBuildInputs = [
bun
writableTmpDirAsHomeHook
];
dontConfigure = true;
dontFixup = true;
buildPhase = ''
runHook preBuild
export BUN_INSTALL_CACHE_DIR=$(mktemp -d)
bun install \
--filter=equibop \
--force \
--frozen-lockfile \
--ignore-scripts \
--linker=hoisted \
--no-progress
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -R ./node_modules $out
runHook postInstall
'';
outputHash =
{
x86_64-linux = "sha256-Gtsy22jI9y6a8NB/bRR4j1z1PwFlfJPzIPznr7fLb8M=";
aarch64-linux = "sha256-LCmlxa6SZwex33c0zjR+cIIp2HdyHNtpZHoAfFKaR+Y=";
}
.${stdenvNoCC.hostPlatform.system}
or (throw "Unsupported system ${stdenvNoCC.hostPlatform.system}");
outputHashAlgo = "sha256";
outputHashMode = "recursive";
}
-182
View File
@@ -1,182 +0,0 @@
{
lib,
stdenv,
callPackage,
fetchFromGitHub,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
electron_45,
python3Packages,
pipewire,
libpulseaudio,
jq,
autoPatchelfHook,
bun,
nodejs,
withTTS ? true,
withMiddleClickScroll ? false,
}:
let
electron = electron_45;
in
stdenv.mkDerivation (finalAttrs: {
pname = "equibop";
version = "3.3.4";
src = fetchFromGitHub {
owner = "Equicord";
repo = "Equibop";
tag = "v${finalAttrs.version}";
hash = "sha256-wsaVqBYETYFTsG78UInY5Z6VvUr8RLWMC8/eW8lTldY=";
};
postPatch = ''
substituteInPlace scripts/build/build.mts \
--replace-fail 'gitHash = execSync("git rev-parse HEAD", { encoding: "utf-8" }).trim();' 'gitHash = "${finalAttrs.src.hash}"'
# disable auto updates
substituteInPlace src/main/updater.ts \
--replace-fail 'const isOutdated = autoUpdater.checkForUpdates().then(res => Boolean(res?.isUpdateAvailable));' 'const isOutdated = false;'
'';
node-modules = callPackage ./node-modules.nix { equibop = finalAttrs.finalPackage; }; # helps when the parent package is overidden
nativeBuildInputs = [
bun
jq
nodejs
# XXX: Equibop *does not* ship venmic as a prebuilt node module. The package
# seems to build with or without this hook, but I (NotAShelf) don't have the
# time to test the consequences of removing this hook. Please open a pull
# request if this bothers you in some way.
autoPatchelfHook
copyDesktopItems
# we use a script wrapper here for environment variable expansion at runtime
# https://github.com/NixOS/nixpkgs/issues/172583
makeWrapper
];
buildInputs = [
libpulseaudio
pipewire
(lib.getLib stdenv.cc.cc)
];
configurePhase = ''
runHook preConfigure
cp -R ${finalAttrs.node-modules} node_modules
runHook postConfigure
'';
preBuild = ''
# Validate electron version matches upstream package.json
if [ "`jq -r '.devDependencies.electron' < package.json | cut -d. -f1 | tr -d '^'`" != "${lib.versions.major electron.version}" ]
then
echo "ERROR: electron version mismatch between package.json and nixpkgs"
exit 1
fi
# electron builds must be writable to support electron fuses
cp -r ${electron.dist} electron-dist
chmod -R u+w electron-dist
'';
buildPhase = ''
runHook preBuild
bun run build
# can't run it via bunx / npx since fixupPhase was skipped for node_modules
node node_modules/electron-builder/out/cli/cli.js \
--dir \
-c.electronDist=electron-dist \
-c.electronVersion=${electron.version} \
-c.npmRebuild=false
runHook postBuild
'';
postBuild = ''
pushd build
${lib.getExe' python3Packages.icnsutil "icnsutil"} e icon.icns
popd
'';
installPhase = ''
runHook preInstall
mkdir -p $out/opt/Equibop
cp -r dist/*unpacked/resources $out/opt/Equibop/
for file in build/icon.icns.export/*.png; do
base=''${file##*/}
size=''${base/x*/}
install -Dm0644 $file $out/share/icons/hicolor/''${size}x''${size}/apps/equibop.png
done
install -Dm0644 build/icon.svg $out/share/icons/hicolor/scalable/apps/equibop.svg
runHook postInstall
'';
postFixup = ''
# NOTE: LD_LIBRARY_PATH is needed, because equibop raises a warning at the start
# and it fixes a couple of bugs
makeWrapper ${electron}/bin/electron $out/bin/equibop \
--add-flags $out/opt/Equibop/resources/app.asar \
${lib.optionalString withTTS ''
--run 'if [[ "''${NIXOS_SPEECH:-default}" != "False" ]]; then NIXOS_SPEECH=True; else unset NIXOS_SPEECH; fi' \
--add-flags "\''${NIXOS_SPEECH:+--enable-speech-dispatcher}" \
''} \
${lib.optionalString withMiddleClickScroll "--add-flags \"--enable-blink-features=MiddleClickAutoscroll\""} \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ (lib.getLib stdenv.cc.cc) ]}"
'';
desktopItems = makeDesktopItem {
name = "equibop";
desktopName = "Equibop";
exec = "equibop %U";
icon = "equibop";
startupWMClass = "Equibop";
genericName = "Internet Messenger";
keywords = [
"discord"
"equibop"
"electron"
"chat"
];
categories = [
"Network"
"InstantMessaging"
"Chat"
];
};
passthru = {
# fails to update node-modules FOD :/
# updateScript = nix-update-script {
# extraArgs = [
# "--subpackage"
# "node-modules"
# ];
# };
};
meta = {
description = "Custom Discord App aiming to give you better performance and improve linux support";
homepage = "https://github.com/Equicord/Equibop";
changelog = "https://github.com/Equicord/Equibop/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
NotAShelf
rexies
PerchunPak
];
mainProgram = "equibop";
# I am not confident in my ability to support Darwin, please PR if this is important to you
platforms = lib.platforms.linux;
};
})