mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-27 06:28:20 -04:00
98 current 2024-04-29 18:13:45 24.05.20240419.5c24cf2 6.6.28 *
This commit is contained in:
parent
e59a29bba0
commit
8d86faab27
10 changed files with 11560 additions and 7 deletions
65
customPackages/vencord/package.nix
Normal file
65
customPackages/vencord/package.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, esbuild
|
||||
, buildWebExtension ? false
|
||||
}:
|
||||
let
|
||||
version = "1.7.9";
|
||||
gitHash = "d294128";
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
pname = "vencord";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Vendicated";
|
||||
repo = "Vencord";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-5kMBUdFupVxmlQ7NVJ7qzFoyQieDGHrFNkrzhlhEzJ0=";
|
||||
};
|
||||
|
||||
ESBUILD_BINARY_PATH = lib.getExe (esbuild.overrideAttrs (final: _: {
|
||||
version = "0.15.18";
|
||||
src = fetchFromGitHub {
|
||||
owner = "evanw";
|
||||
repo = "esbuild";
|
||||
rev = "v${final.version}";
|
||||
hash = "sha256-b9R1ML+pgRg9j2yrkQmBulPuLHYLUQvW+WTyR/Cq6zE=";
|
||||
};
|
||||
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
|
||||
}));
|
||||
|
||||
# Supresses an error about esbuild's version.
|
||||
npmRebuildFlags = [ "|| true" ];
|
||||
|
||||
makeCacheWritable = true;
|
||||
npmDepsHash = "sha256-G3adLiSrEyAShTsNEaYLEPYACHoXTISiNp/9jru0mUc=";
|
||||
npmFlags = [ "--legacy-peer-deps" ];
|
||||
npmBuildScript = if buildWebExtension then "buildWeb" else "build";
|
||||
npmBuildFlags = [ "--" "--standalone" "--disable-updater" ];
|
||||
|
||||
prePatch = ''
|
||||
cp ${./package-lock.json} ./package-lock.json
|
||||
chmod +w ./package-lock.json
|
||||
'';
|
||||
|
||||
VENCORD_HASH = gitHash;
|
||||
VENCORD_REMOTE = "${src.owner}/${src.repo}";
|
||||
|
||||
installPhase =
|
||||
if buildWebExtension then ''
|
||||
cp -r dist/chromium-unpacked/ $out
|
||||
'' else ''
|
||||
cp -r dist/ $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Vencord web extension";
|
||||
homepage = "https://github.com/Vendicated/Vencord";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ FlafyDev fwam NotAShelf Scrumplex ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue