Merge pull request #229173 from Scrumplex/vencord-discord
This commit is contained in:
commit
0a90f51a58
@ -1,4 +1,7 @@
|
||||
{ pname, version, src, openasar, meta, stdenv, binaryName, desktopName, lib, undmg, makeWrapper, branch, withOpenASAR ? false }:
|
||||
{ pname, version, src, meta, stdenv, binaryName, desktopName, lib, undmg, makeWrapper
|
||||
, branch
|
||||
, withOpenASAR ? false, openasar
|
||||
, withVencord ? false, vencord }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version src meta;
|
||||
@ -22,5 +25,10 @@ stdenv.mkDerivation {
|
||||
|
||||
postInstall = lib.strings.optionalString withOpenASAR ''
|
||||
cp -f ${openasar} $out/Applications/${desktopName}.app/Contents/Resources/app.asar
|
||||
'' + lib.strings.optionalString withVencord ''
|
||||
mv $out/Applications/${desktopName}.app/Contents/Resources/app.asar $out/Applications/${desktopName}.app/Contents/Resources/_app.asar
|
||||
mkdir $out/Applications/${desktopName}.app/Contents/Resources/app.asar
|
||||
echo '{"name":"discord","main":"index.js"}' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/package.json
|
||||
echo 'require("${vencord}/patcher.js")' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/index.js
|
||||
'';
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ let
|
||||
downloadPage = "https://discordapp.com/download";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ MP2E artturin infinidoge jopejoe1 ];
|
||||
maintainers = with maintainers; [ MP2E Scrumplex artturin infinidoge jopejoe1 ];
|
||||
platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
};
|
||||
package =
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ pname, version, src, openasar, meta, binaryName, desktopName, autoPatchelfHook
|
||||
{ pname, version, src, meta, binaryName, desktopName, autoPatchelfHook
|
||||
, makeDesktopItem, lib, stdenv, wrapGAppsHook, makeShellWrapper, alsa-lib, at-spi2-atk
|
||||
, at-spi2-core, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk-pixbuf
|
||||
, glib, gtk3, libcxx, libdrm, libglvnd, libnotify, libpulseaudio, libuuid, libX11
|
||||
@ -9,7 +9,9 @@
|
||||
, speechd
|
||||
, wayland
|
||||
, branch
|
||||
, common-updater-scripts, withOpenASAR ? false, withTTS ? false }:
|
||||
, withOpenASAR ? false, openasar
|
||||
, withVencord ? false, vencord
|
||||
, withTTS ? false }:
|
||||
|
||||
let
|
||||
disableBreakingUpdates = runCommand "disable-breaking-updates.py"
|
||||
@ -124,6 +126,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = lib.strings.optionalString withOpenASAR ''
|
||||
cp -f ${openasar} $out/opt/${binaryName}/resources/app.asar
|
||||
'' + lib.strings.optionalString withVencord ''
|
||||
mv $out/opt/${binaryName}/resources/app.asar $out/opt/${binaryName}/resources/_app.asar
|
||||
mkdir $out/opt/${binaryName}/resources/app.asar
|
||||
echo '{"name":"discord","main":"index.js"}' > $out/opt/${binaryName}/resources/app.asar/package.json
|
||||
echo 'require("${vencord}/patcher.js")' > $out/opt/${binaryName}/resources/app.asar/index.js
|
||||
'';
|
||||
|
||||
desktopItem = makeDesktopItem {
|
||||
|
@ -1,13 +1,13 @@
|
||||
{ webcord
|
||||
, substituteAll
|
||||
, callPackage
|
||||
, lib
|
||||
, vencord-web-extension
|
||||
}:
|
||||
webcord.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [
|
||||
(substituteAll {
|
||||
src = ./add-extension.patch;
|
||||
vencord = callPackage ./vencord-web-extension { };
|
||||
vencord = vencord-web-extension;
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -4,9 +4,10 @@
|
||||
, substituteAll
|
||||
, esbuild
|
||||
, buildGoModule
|
||||
, buildWebExtension ? false
|
||||
}:
|
||||
buildNpmPackage rec {
|
||||
pname = "vencord-web-extension";
|
||||
pname = "vencord";
|
||||
version = "1.1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@ -34,7 +35,7 @@ buildNpmPackage rec {
|
||||
|
||||
npmDepsHash = "sha256-jKSdeyQ8oHw7ZGby0XzDg4O8mtH276ykVuBcw7dU/Ls=";
|
||||
npmFlags = [ "--legacy-peer-deps" ];
|
||||
npmBuildScript = "buildWeb";
|
||||
npmBuildScript = if buildWebExtension then "buildWeb" else "build";
|
||||
|
||||
prePatch = ''
|
||||
cp ${./package-lock.json} ./package-lock.json
|
||||
@ -47,14 +48,16 @@ buildNpmPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
cp -r dist/extension-unpacked $out
|
||||
installPhase = if buildWebExtension then ''
|
||||
cp -r dist/extension-unpacked/ $out
|
||||
'' else ''
|
||||
cp -r dist/ $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Vencord web extension";
|
||||
homepage = "https://github.com/Vendicated/Vencord";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ FlafyDev NotAShelf ];
|
||||
maintainers = with maintainers; [ FlafyDev NotAShelf Scrumplex ];
|
||||
};
|
||||
}
|
@ -24411,6 +24411,10 @@ with pkgs;
|
||||
|
||||
vcg = callPackage ../development/libraries/vcg { };
|
||||
|
||||
vencord = callPackage ../misc/vencord { };
|
||||
|
||||
vencord-web-extension = callPackage ../misc/vencord { buildWebExtension = true; };
|
||||
|
||||
vid-stab = callPackage ../development/libraries/vid-stab {
|
||||
inherit (llvmPackages) openmp;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user