equibop: 2.1.7 -> 3.1.7 (#456790)
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
diff --git i/src/main/index.ts w/src/main/index.ts
|
||||
index 23ea0d6..1ef465f 100644
|
||||
--- i/src/main/index.ts
|
||||
+++ w/src/main/index.ts
|
||||
@@ -22,7 +22,9 @@ import { isDeckGameMode } from "./utils/steamOS";
|
||||
|
||||
if (!IS_DEV) {
|
||||
- autoUpdater.checkForUpdatesAndNotify();
|
||||
+ console.log("Update checking is disabled. Skipping...");
|
||||
+ // autoUpdater.checkForUpdatesAndNotify();
|
||||
+
|
||||
}
|
||||
|
||||
console.log("Equibop v" + app.getVersion());
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# 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 = "sha256-YqUAP11oSxfKifa8QL4VXGCWV5xGG2+vk60f4NdIXIA=";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
}
|
||||
@@ -1,52 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
replaceVars,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
equicord,
|
||||
electron,
|
||||
libicns,
|
||||
python3Packages,
|
||||
pipewire,
|
||||
libpulseaudio,
|
||||
autoPatchelfHook,
|
||||
pnpm_10,
|
||||
fetchPnpmDeps,
|
||||
pnpmConfigHook,
|
||||
bun,
|
||||
nodejs,
|
||||
nix-update-script,
|
||||
withTTS ? true,
|
||||
withMiddleClickScroll ? false,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "equibop";
|
||||
version = "2.1.7";
|
||||
version = "3.1.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Equicord";
|
||||
repo = "Equibop";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-wvg06YSQOZvP/NHl3WPfnI9F0+KN0cJ2CBwaZD8Xpfk=";
|
||||
hash = "sha256-AzXBANUcm/DYYkNlO7q++/Dx826o5Hg/1cYJ84rMY0U=";
|
||||
};
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
patches
|
||||
;
|
||||
pnpm = pnpm_10;
|
||||
fetcherVersion = 1;
|
||||
hash = "sha256-HQxQIMbj2xsxD1jwj/itfAW6KHxX81Eu60ouzxQDu44=";
|
||||
};
|
||||
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 { };
|
||||
|
||||
nativeBuildInputs = [
|
||||
bun
|
||||
nodejs
|
||||
pnpmConfigHook
|
||||
pnpm_10
|
||||
# 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
|
||||
@@ -64,30 +58,45 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.getLib stdenv.cc.cc)
|
||||
];
|
||||
|
||||
patches = [
|
||||
./disable_update_checking.patch
|
||||
];
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
env = {
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
|
||||
};
|
||||
cp -R ${finalAttrs.node-modules} node_modules
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
# electron builds must be writable to support electron fuses
|
||||
preBuild =
|
||||
lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
cp -r ${electron.dist}/Electron.app .
|
||||
chmod -R u+w Electron.app
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
cp -r ${electron.dist} electron-dist
|
||||
chmod -R u+w electron-dist
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
pnpm build
|
||||
pnpm exec electron-builder \
|
||||
bun run build
|
||||
|
||||
bun run compileArrpc
|
||||
|
||||
# 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.asarUnpack="**/*.node" \
|
||||
-c.electronDist=${electron.dist} \
|
||||
-c.electronVersion=${electron.version}
|
||||
-c.electronDist=${if stdenv.hostPlatform.isDarwin then "." else "electron-dist"} \
|
||||
-c.electronVersion=${electron.version} \
|
||||
-c.npmRebuild=false
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
pushd build
|
||||
${libicns}/bin/icns2png -x icon.icns
|
||||
${lib.getExe' python3Packages.icnsutil "icnsutil"} e icon.icns
|
||||
popd
|
||||
'';
|
||||
|
||||
@@ -96,11 +105,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mkdir -p $out/opt/Equibop
|
||||
cp -r dist/*unpacked/resources $out/opt/Equibop/
|
||||
|
||||
for file in build/icon_*x32.png; do
|
||||
file_suffix=''${file//build\/icon_}
|
||||
install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/equibop.png
|
||||
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
|
||||
'';
|
||||
|
||||
@@ -133,7 +145,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
};
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
# fails to update node-modules FOD :/
|
||||
# updateScript = nix-update-script {
|
||||
# extraArgs = [
|
||||
# "--subpackage"
|
||||
# "node-modules"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -141,8 +159,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "https://github.com/Equicord/Equibop";
|
||||
changelog = "https://github.com/Equicord/Equibop/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = [
|
||||
lib.maintainers.NotAShelf
|
||||
maintainers = with lib.maintainers; [
|
||||
NotAShelf
|
||||
rexies
|
||||
];
|
||||
mainProgram = "equibop";
|
||||
# I am not confident in my ability to support Darwin, please PR if this is important to you
|
||||
|
||||
Reference in New Issue
Block a user