mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 18:44:13 +00:00
Merge release-24.05 into staging-next-24.05
This commit is contained in:
commit
d6eae6eae3
@ -64,129 +64,135 @@ let
|
||||
else
|
||||
throw "Unsupported database type: ${cfg.database.type} for socket: ${cfg.database.socket}";
|
||||
|
||||
mediawikiConfig = pkgs.writeText "LocalSettings.php" ''
|
||||
<?php
|
||||
# Protect against web entry
|
||||
if ( !defined( 'MEDIAWIKI' ) ) {
|
||||
exit;
|
||||
}
|
||||
mediawikiConfig = pkgs.writeTextFile {
|
||||
name = "LocalSettings.php";
|
||||
checkPhase = ''
|
||||
${php}/bin/php --syntax-check "$target"
|
||||
'';
|
||||
text = ''
|
||||
<?php
|
||||
# Protect against web entry
|
||||
if ( !defined( 'MEDIAWIKI' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$wgSitename = "${cfg.name}";
|
||||
$wgMetaNamespace = false;
|
||||
$wgSitename = "${cfg.name}";
|
||||
$wgMetaNamespace = false;
|
||||
|
||||
## The URL base path to the directory containing the wiki;
|
||||
## defaults for all runtime URL paths are based off of this.
|
||||
## For more information on customizing the URLs
|
||||
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
|
||||
## https://www.mediawiki.org/wiki/Manual:Short_URL
|
||||
$wgScriptPath = "${lib.optionalString (cfg.webserver == "nginx") "/w"}";
|
||||
## The URL base path to the directory containing the wiki;
|
||||
## defaults for all runtime URL paths are based off of this.
|
||||
## For more information on customizing the URLs
|
||||
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
|
||||
## https://www.mediawiki.org/wiki/Manual:Short_URL
|
||||
$wgScriptPath = "${lib.optionalString (cfg.webserver == "nginx") "/w"}";
|
||||
|
||||
## The protocol and server name to use in fully-qualified URLs
|
||||
$wgServer = "${cfg.url}";
|
||||
## The protocol and server name to use in fully-qualified URLs
|
||||
$wgServer = "${cfg.url}";
|
||||
|
||||
## The URL path to static resources (images, scripts, etc.)
|
||||
$wgResourceBasePath = $wgScriptPath;
|
||||
## The URL path to static resources (images, scripts, etc.)
|
||||
$wgResourceBasePath = $wgScriptPath;
|
||||
|
||||
${lib.optionalString (cfg.webserver == "nginx") ''
|
||||
$wgArticlePath = "/wiki/$1";
|
||||
$wgUsePathInfo = true;
|
||||
''}
|
||||
${lib.optionalString (cfg.webserver == "nginx") ''
|
||||
$wgArticlePath = "/wiki/$1";
|
||||
$wgUsePathInfo = true;
|
||||
''}
|
||||
|
||||
## The URL path to the logo. Make sure you change this from the default,
|
||||
## or else you'll overwrite your logo when you upgrade!
|
||||
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
|
||||
## The URL path to the logo. Make sure you change this from the default,
|
||||
## or else you'll overwrite your logo when you upgrade!
|
||||
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
|
||||
|
||||
## UPO means: this is also a user preference option
|
||||
## UPO means: this is also a user preference option
|
||||
|
||||
$wgEnableEmail = true;
|
||||
$wgEnableUserEmail = true; # UPO
|
||||
$wgEnableEmail = true;
|
||||
$wgEnableUserEmail = true; # UPO
|
||||
|
||||
$wgPasswordSender = "${cfg.passwordSender}";
|
||||
$wgPasswordSender = "${cfg.passwordSender}";
|
||||
|
||||
$wgEnotifUserTalk = false; # UPO
|
||||
$wgEnotifWatchlist = false; # UPO
|
||||
$wgEmailAuthentication = true;
|
||||
$wgEnotifUserTalk = false; # UPO
|
||||
$wgEnotifWatchlist = false; # UPO
|
||||
$wgEmailAuthentication = true;
|
||||
|
||||
## Database settings
|
||||
$wgDBtype = "${cfg.database.type}";
|
||||
$wgDBserver = "${dbAddr}";
|
||||
$wgDBport = "${toString cfg.database.port}";
|
||||
$wgDBname = "${cfg.database.name}";
|
||||
$wgDBuser = "${cfg.database.user}";
|
||||
${optionalString (cfg.database.passwordFile != null) "$wgDBpassword = file_get_contents(\"${cfg.database.passwordFile}\");"}
|
||||
## Database settings
|
||||
$wgDBtype = "${cfg.database.type}";
|
||||
$wgDBserver = "${dbAddr}";
|
||||
$wgDBport = "${toString cfg.database.port}";
|
||||
$wgDBname = "${cfg.database.name}";
|
||||
$wgDBuser = "${cfg.database.user}";
|
||||
${optionalString (cfg.database.passwordFile != null) "$wgDBpassword = file_get_contents(\"${cfg.database.passwordFile}\");"}
|
||||
|
||||
${optionalString (cfg.database.type == "mysql" && cfg.database.tablePrefix != null) ''
|
||||
# MySQL specific settings
|
||||
$wgDBprefix = "${cfg.database.tablePrefix}";
|
||||
''}
|
||||
${optionalString (cfg.database.type == "mysql" && cfg.database.tablePrefix != null) ''
|
||||
# MySQL specific settings
|
||||
$wgDBprefix = "${cfg.database.tablePrefix}";
|
||||
''}
|
||||
|
||||
${optionalString (cfg.database.type == "mysql") ''
|
||||
# MySQL table options to use during installation or update
|
||||
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
|
||||
''}
|
||||
${optionalString (cfg.database.type == "mysql") ''
|
||||
# MySQL table options to use during installation or update
|
||||
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
|
||||
''}
|
||||
|
||||
## Shared memory settings
|
||||
$wgMainCacheType = CACHE_NONE;
|
||||
$wgMemCachedServers = [];
|
||||
## Shared memory settings
|
||||
$wgMainCacheType = CACHE_NONE;
|
||||
$wgMemCachedServers = [];
|
||||
|
||||
${optionalString (cfg.uploadsDir != null) ''
|
||||
$wgEnableUploads = true;
|
||||
$wgUploadDirectory = "${cfg.uploadsDir}";
|
||||
''}
|
||||
${optionalString (cfg.uploadsDir != null) ''
|
||||
$wgEnableUploads = true;
|
||||
$wgUploadDirectory = "${cfg.uploadsDir}";
|
||||
''}
|
||||
|
||||
$wgUseImageMagick = true;
|
||||
$wgImageMagickConvertCommand = "${pkgs.imagemagick}/bin/convert";
|
||||
$wgUseImageMagick = true;
|
||||
$wgImageMagickConvertCommand = "${pkgs.imagemagick}/bin/convert";
|
||||
|
||||
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
|
||||
$wgUseInstantCommons = false;
|
||||
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
|
||||
$wgUseInstantCommons = false;
|
||||
|
||||
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
|
||||
# about this MediaWiki instance. The Wikimedia Foundation shares this data
|
||||
# with MediaWiki developers to help guide future development efforts.
|
||||
$wgPingback = true;
|
||||
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
|
||||
# about this MediaWiki instance. The Wikimedia Foundation shares this data
|
||||
# with MediaWiki developers to help guide future development efforts.
|
||||
$wgPingback = true;
|
||||
|
||||
## If you use ImageMagick (or any other shell command) on a
|
||||
## Linux server, this will need to be set to the name of an
|
||||
## available UTF-8 locale
|
||||
$wgShellLocale = "C.UTF-8";
|
||||
## If you use ImageMagick (or any other shell command) on a
|
||||
## Linux server, this will need to be set to the name of an
|
||||
## available UTF-8 locale
|
||||
$wgShellLocale = "C.UTF-8";
|
||||
|
||||
## Set $wgCacheDirectory to a writable directory on the web server
|
||||
## to make your wiki go slightly faster. The directory should not
|
||||
## be publicly accessible from the web.
|
||||
$wgCacheDirectory = "${cacheDir}";
|
||||
## Set $wgCacheDirectory to a writable directory on the web server
|
||||
## to make your wiki go slightly faster. The directory should not
|
||||
## be publicly accessible from the web.
|
||||
$wgCacheDirectory = "${cacheDir}";
|
||||
|
||||
# Site language code, should be one of the list in ./languages/data/Names.php
|
||||
$wgLanguageCode = "en";
|
||||
# Site language code, should be one of the list in ./languages/data/Names.php
|
||||
$wgLanguageCode = "en";
|
||||
|
||||
$wgSecretKey = file_get_contents("${stateDir}/secret.key");
|
||||
$wgSecretKey = file_get_contents("${stateDir}/secret.key");
|
||||
|
||||
# Changing this will log out all existing sessions.
|
||||
$wgAuthenticationTokenVersion = "";
|
||||
# Changing this will log out all existing sessions.
|
||||
$wgAuthenticationTokenVersion = "";
|
||||
|
||||
## For attaching licensing metadata to pages, and displaying an
|
||||
## appropriate copyright notice / icon. GNU Free Documentation
|
||||
## License and Creative Commons licenses are supported so far.
|
||||
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
||||
$wgRightsUrl = "";
|
||||
$wgRightsText = "";
|
||||
$wgRightsIcon = "";
|
||||
## For attaching licensing metadata to pages, and displaying an
|
||||
## appropriate copyright notice / icon. GNU Free Documentation
|
||||
## License and Creative Commons licenses are supported so far.
|
||||
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
||||
$wgRightsUrl = "";
|
||||
$wgRightsText = "";
|
||||
$wgRightsIcon = "";
|
||||
|
||||
# Path to the GNU diff3 utility. Used for conflict resolution.
|
||||
$wgDiff = "${pkgs.diffutils}/bin/diff";
|
||||
$wgDiff3 = "${pkgs.diffutils}/bin/diff3";
|
||||
# Path to the GNU diff3 utility. Used for conflict resolution.
|
||||
$wgDiff = "${pkgs.diffutils}/bin/diff";
|
||||
$wgDiff3 = "${pkgs.diffutils}/bin/diff3";
|
||||
|
||||
# Enabled skins.
|
||||
${concatStringsSep "\n" (mapAttrsToList (k: v: "wfLoadSkin('${k}');") cfg.skins)}
|
||||
# Enabled skins.
|
||||
${concatStringsSep "\n" (mapAttrsToList (k: v: "wfLoadSkin('${k}');") cfg.skins)}
|
||||
|
||||
# Enabled extensions.
|
||||
${concatStringsSep "\n" (mapAttrsToList (k: v: "wfLoadExtension('${k}');") cfg.extensions)}
|
||||
# Enabled extensions.
|
||||
${concatStringsSep "\n" (mapAttrsToList (k: v: "wfLoadExtension('${k}');") cfg.extensions)}
|
||||
|
||||
|
||||
# End of automatically generated settings.
|
||||
# Add more configuration options below.
|
||||
# End of automatically generated settings.
|
||||
# Add more configuration options below.
|
||||
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
};
|
||||
|
||||
withTrailingSlash = str: if lib.hasSuffix "/" str then str else "${str}/";
|
||||
in
|
||||
|
@ -79,11 +79,11 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zrythm";
|
||||
version = "1.0.0-rc.1";
|
||||
version = "1.0.0-rc.2";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://www.zrythm.org/releases/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-Ljbw7bjGI6js4OP9KEXCkhC9AMbInSz0nn+pROm4vXw=";
|
||||
url = "https://www.zrythm.org/releases/zrythm-${finalAttrs.version}.tar.xz";
|
||||
sha256 = "sha256-Da//nY0yXSbDPEg6t9jgL32NoT8dFYSQ4Kzc/KbHGSk=";
|
||||
};
|
||||
|
||||
passthru.updateScript = writeScript "update-zrythm" ''
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
stable = {
|
||||
chromedriver = {
|
||||
hash_darwin = "sha256-SZfl93TcaD9j59zGflPFmHgIP5NaS8bgDi3l3SRRFiI=";
|
||||
hash_darwin = "sha256-4uE34f99fTiG5FJq0xnEodqQvNT2Aa8kesYOxY44xXA=";
|
||||
hash_darwin_aarch64 =
|
||||
"sha256-wLX63aA8l+23ehdBHPcXtoZ2WEhrmYVKzqUDBbrhSRw=";
|
||||
hash_linux = "sha256-kP6N7fM+7+S3JwT2JvqfWDRCfAQiNc/rQlHxjJ8DNuo=";
|
||||
version = "130.0.6723.69";
|
||||
"sha256-gDrfR5EgBx3YRxf3/08gayOhmEqSw4G/QcuNtfHmRHk=";
|
||||
hash_linux = "sha256-qMlM6ilsIqm8G5KLE4uGVb/s2bNyZSyQmxsq+EHKX/c=";
|
||||
version = "130.0.6723.91";
|
||||
};
|
||||
deps = {
|
||||
gn = {
|
||||
@ -15,8 +15,8 @@
|
||||
version = "2024-09-09";
|
||||
};
|
||||
};
|
||||
hash = "sha256-k0epbUw9D3Vx7ELNDXIFEnsML+cYvDnHZFOW0kz4Kq8=";
|
||||
version = "130.0.6723.69";
|
||||
hash = "sha256-qXCcHas3l3viszDtY5d5JEToPo2hHTaBmi+pJlKQr4M=";
|
||||
version = "130.0.6723.91";
|
||||
};
|
||||
ungoogled-chromium = {
|
||||
deps = {
|
||||
@ -27,11 +27,11 @@
|
||||
version = "2024-09-09";
|
||||
};
|
||||
ungoogled-patches = {
|
||||
hash = "sha256-usNlX/ol8Zn3lQTvp311DuyYbSHF/HN0r7k8qeUIJmU=";
|
||||
rev = "130.0.6723.69-1";
|
||||
hash = "sha256-LhCrwOwPmEn5xlBLTgp2NMfQLxYbSg0pdZxshoqQAGw=";
|
||||
rev = "130.0.6723.91-1";
|
||||
};
|
||||
};
|
||||
hash = "sha256-k0epbUw9D3Vx7ELNDXIFEnsML+cYvDnHZFOW0kz4Kq8=";
|
||||
version = "130.0.6723.69";
|
||||
hash = "sha256-qXCcHas3l3viszDtY5d5JEToPo2hHTaBmi+pJlKQr4M=";
|
||||
version = "130.0.6723.91";
|
||||
};
|
||||
}
|
||||
|
45
pkgs/by-name/du/duckstation-bin/package.nix
Normal file
45
pkgs/by-name/du/duckstation-bin/package.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
unzip,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "duckstation-bin";
|
||||
version = "0.1-7294";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/stenzek/duckstation/releases/download/v${finalAttrs.version}/duckstation-mac-release.zip";
|
||||
hash = "sha256-33aipZjYJOquQBbe8Ve9KRfLGW29v9xoztUsaY8LAjw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
dontPatch = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/Applications
|
||||
cp -r DuckStation.app $out/Applications/DuckStation.app
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/stenzek/duckstation";
|
||||
description = "Fast PlayStation 1 emulator for x86-64/AArch32/AArch64";
|
||||
changelog = "https://github.com/stenzek/duckstation/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ matteopacini ];
|
||||
platforms = lib.platforms.darwin;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
})
|
20
pkgs/by-name/du/duckstation-bin/update.sh
Executable file
20
pkgs/by-name/du/duckstation-bin/update.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq gnused
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
# Grab latest version, ignoring "latest" and "preview" tags
|
||||
LATEST_VER="$(curl --fail -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/stenzek/duckstation/releases" | jq -r '.[].tag_name' | grep '^v' | head -n 1 | sed 's/^v//')"
|
||||
CURRENT_VER="$(grep -oP 'version = "\K[^"]+' package.nix)"
|
||||
|
||||
if [[ "$LATEST_VER" == "$CURRENT_VER" ]]; then
|
||||
echo "duckstation-bin is up-to-date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
HASH="$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/stenzek/duckstation/releases/download/v${LATEST_VER}/duckstation-mac-release.zip")")"
|
||||
|
||||
sed -i "s#hash = \".*\"#hash = \"$HASH\"#g" package.nix
|
||||
sed -i "s#version = \".*\";#version = \"$LATEST_VER\";#g" package.nix
|
@ -53,13 +53,13 @@ let
|
||||
in
|
||||
effectiveStdenv.mkDerivation (finalAttrs: {
|
||||
pname = "koboldcpp";
|
||||
version = "1.76";
|
||||
version = "1.77";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LostRuins";
|
||||
repo = "koboldcpp";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
hash = "sha256-0zV9aZIfNnbV/K6xYUp+ucdJvdEfuGdKgE/Q7vcBopQ=";
|
||||
hash = "sha256-dyu//4LRjpdxkyA9M5yNDO0DA7inZZjH4pSkj6l2afk=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
30
pkgs/by-name/li/libcsa/package.nix
Normal file
30
pkgs/by-name/li/libcsa/package.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
unstableGitUpdater,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "csa";
|
||||
version = "1.26-unstable-2024-03-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sakov";
|
||||
repo = "csa-c";
|
||||
rev = "7b48134613d1d3b337af6d5762df9999a703fb1a";
|
||||
hash = "sha256-G/VhXpdvXBT9I6pwiQXVqCoXhc29wJQpGyLeM3kgv7I=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/csa";
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "C code for cubic spline approximation of 2D scattered data";
|
||||
homepage = "https://github.com/sakov/csa-c/";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ mkez ];
|
||||
mainProgram = "csabathy";
|
||||
};
|
||||
})
|
@ -1,12 +1,12 @@
|
||||
diff --git a/src/updater/main.ts b/src/updater/main.ts
|
||||
index 059afb9..274802e 100644
|
||||
--- a/src/updater/main.ts
|
||||
+++ b/src/updater/main.ts
|
||||
@@ -77,6 +77,7 @@ function isOutdated(oldVersion: string, newVersion: string) {
|
||||
diff --git a/src/main/index.ts b/src/main/index.ts
|
||||
index 2e0d6f7..1108c0f 100644
|
||||
--- a/src/main/index.ts
|
||||
+++ b/src/main/index.ts
|
||||
@@ -20,7 +20,6 @@ import { isDeckGameMode } from "./utils/steamOS";
|
||||
if (IS_DEV) {
|
||||
require("source-map-support").install();
|
||||
} else {
|
||||
- autoUpdater.checkForUpdatesAndNotify();
|
||||
}
|
||||
|
||||
export async function checkUpdates() {
|
||||
+ return;
|
||||
if (Settings.store.checkUpdates === false) return;
|
||||
|
||||
try {
|
||||
// Make the Vencord files use our DATA_DIR
|
||||
|
@ -1,101 +1,68 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
substituteAll,
|
||||
makeBinaryWrapper,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
vencord,
|
||||
electron,
|
||||
libicns,
|
||||
jq,
|
||||
moreutils,
|
||||
cacert,
|
||||
nodePackages,
|
||||
pipewire,
|
||||
libpulseaudio,
|
||||
autoPatchelfHook,
|
||||
pnpm_9,
|
||||
nodejs,
|
||||
nix-update-script,
|
||||
withTTS ? true,
|
||||
withMiddleClickScroll ? false,
|
||||
# Enables the use of vencord from nixpkgs instead of
|
||||
# letting vesktop manage it's own version
|
||||
withSystemVencord ? false,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "vesktop";
|
||||
version = "1.5.2";
|
||||
version = "1.5.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Vencord";
|
||||
repo = "Vesktop";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-cZOyydwpIW9Xq716KVi1RGtSlgVnOP3w8vXDwouS70E=";
|
||||
hash = "sha256-HlT7ddlrMHG1qOCqdaYjuWhJD+5FF1Nkv2sfXLWd07o=";
|
||||
};
|
||||
|
||||
# NOTE: This requires pnpm 8.10.0 or newer
|
||||
# https://github.com/pnpm/pnpm/pull/7214
|
||||
pnpmDeps =
|
||||
assert lib.versionAtLeast nodePackages.pnpm.version "8.10.0";
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "${finalAttrs.pname}-pnpm-deps";
|
||||
inherit (finalAttrs)
|
||||
src
|
||||
version
|
||||
patches
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD
|
||||
;
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs)
|
||||
pname
|
||||
version
|
||||
src
|
||||
patches
|
||||
;
|
||||
hash = "sha256-rizJu6v04wFEpJtakC2tfPg/uylz7gAOzJiXvUwdDI4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cacert
|
||||
jq
|
||||
moreutils
|
||||
nodePackages.pnpm
|
||||
];
|
||||
nativeBuildInputs =
|
||||
[
|
||||
nodejs
|
||||
pnpm_9.configHook
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
# vesktop uses venmic, which is a shipped as a prebuilt node module
|
||||
# and needs to be patched
|
||||
autoPatchelfHook
|
||||
copyDesktopItems
|
||||
# we use a script wrapper here for environment variable expansion at runtime
|
||||
# https://github.com/NixOS/nixpkgs/issues/172583
|
||||
makeWrapper
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
# on macos we don't need to expand variables, so we can use the faster binary wrapper
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
# inspired by https://github.com/NixOS/nixpkgs/blob/763e59ffedb5c25774387bf99bc725df5df82d10/pkgs/applications/misc/pot/default.nix#L56
|
||||
# and based on https://github.com/NixOS/nixpkgs/pull/290715
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
pnpm config set store-dir $out
|
||||
# Some packages produce platform dependent outputs. We do not want to cache those in the global store
|
||||
pnpm config set side-effects-cache false
|
||||
# pnpm is going to warn us about using --force
|
||||
# --force allows us to fetch all dependencies including ones that aren't meant for our host platform
|
||||
pnpm install --force --frozen-lockfile --ignore-script
|
||||
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
runHook preFixup
|
||||
|
||||
# Remove timestamp and sort the json files
|
||||
rm -rf $out/v3/tmp
|
||||
for f in $(find $out -name "*.json"); do
|
||||
sed -i -E -e 's/"checkedAt":[0-9]+,//g' $f
|
||||
jq --sort-keys . $f | sponge $f
|
||||
done
|
||||
|
||||
runHook postFixup
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-PogE8uf3W5cKSCqFHMz7FOvT7ONUP4FiFWGBgtk3UC8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
copyDesktopItems
|
||||
makeWrapper
|
||||
nodePackages.pnpm
|
||||
nodePackages.nodejs
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
buildInputs = lib.optionals stdenv.isLinux [
|
||||
libpulseaudio
|
||||
pipewire
|
||||
stdenv.cc.cc.lib
|
||||
@ -108,84 +75,97 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = ./use_system_vencord.patch;
|
||||
});
|
||||
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
|
||||
env = {
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
# disable code signing on macos
|
||||
# https://github.com/electron-userland/electron-builder/blob/77f977435c99247d5db395895618b150f5006e8f/docs/code-signing.md#how-to-disable-code-signing-during-the-build-process-on-macos
|
||||
postConfigure = lib.optionalString stdenv.isDarwin ''
|
||||
export CSC_IDENTITY_AUTO_DISCOVERY=false
|
||||
'';
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
export STORE_PATH=$(mktemp -d)
|
||||
|
||||
cp -Tr "$pnpmDeps" "$STORE_PATH"
|
||||
chmod -R +w "$STORE_PATH"
|
||||
|
||||
pnpm config set store-dir "$STORE_PATH"
|
||||
pnpm install --frozen-lockfile --ignore-script --offline
|
||||
patchShebangs node_modules/{*,.*}
|
||||
|
||||
runHook postConfigure
|
||||
# electron builds must be writable on darwin
|
||||
preBuild = lib.optionalString stdenv.isDarwin ''
|
||||
cp -r ${electron}/Applications/Electron.app .
|
||||
chmod -R u+w Electron.app
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
pnpm build
|
||||
# using `pnpm exec` here apparently makes it ignore ELECTRON_SKIP_BINARY_DOWNLOAD
|
||||
./node_modules/.bin/electron-builder \
|
||||
pnpm exec electron-builder \
|
||||
--dir \
|
||||
-c.asarUnpack="**/*.node" \
|
||||
-c.electronDist=${electron}/libexec/electron \
|
||||
-c.electronDist=${if stdenv.isDarwin then "." else "${electron}/libexec/electron"} \
|
||||
-c.electronVersion=${electron.version}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# this is consistent with other nixpkgs electron packages and upstream, as far as I am aware
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/opt/Vesktop
|
||||
cp -r dist/linux-*unpacked/resources $out/opt/Vesktop/
|
||||
|
||||
postBuild = lib.optionalString stdenv.isLinux ''
|
||||
pushd build
|
||||
${libicns}/bin/icns2png -x icon.icns
|
||||
for file in icon_*x32.png; do
|
||||
file_suffix=''${file//icon_}
|
||||
install -Dm0644 $file $out/share/icons/hicolor/''${file_suffix//x32.png}/apps/vesktop.png
|
||||
done
|
||||
|
||||
makeWrapper ${electron}/bin/electron $out/bin/vesktop \
|
||||
--add-flags $out/opt/Vesktop/resources/app.asar \
|
||||
${lib.optionalString withTTS "--add-flags \"--enable-speech-dispatcher\""} \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}"
|
||||
|
||||
runHook postInstall
|
||||
popd
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "vesktop";
|
||||
desktopName = "Vesktop";
|
||||
exec = "vesktop %U";
|
||||
icon = "vesktop";
|
||||
startupWMClass = "Vesktop";
|
||||
genericName = "Internet Messenger";
|
||||
keywords = [
|
||||
"discord"
|
||||
"vencord"
|
||||
"electron"
|
||||
"chat"
|
||||
];
|
||||
categories = [
|
||||
"Network"
|
||||
"InstantMessaging"
|
||||
"Chat"
|
||||
];
|
||||
})
|
||||
];
|
||||
installPhase =
|
||||
''
|
||||
runHook preInstall
|
||||
''
|
||||
+ lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p $out/opt/Vesktop
|
||||
cp -r dist/*unpacked/resources $out/opt/Vesktop/
|
||||
|
||||
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/vesktop.png
|
||||
done
|
||||
''
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p $out/{Applications,bin}
|
||||
mv dist/mac*/Vesktop.app $out/Applications/Vesktop.app
|
||||
''
|
||||
+ ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup =
|
||||
lib.optionalString stdenv.isLinux ''
|
||||
makeWrapper ${electron}/bin/electron $out/bin/vesktop \
|
||||
--add-flags $out/opt/Vesktop/resources/app.asar \
|
||||
${lib.optionalString withTTS "--add-flags \"--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}}"
|
||||
''
|
||||
+ lib.optionalString stdenv.isDarwin ''
|
||||
makeWrapper $out/Applications/Vesktop.app/Contents/MacOS/Vesktop $out/bin/vesktop
|
||||
'';
|
||||
|
||||
desktopItems = lib.optional stdenv.isLinux (makeDesktopItem {
|
||||
name = "vesktop";
|
||||
desktopName = "Vesktop";
|
||||
exec = "vesktop %U";
|
||||
icon = "vesktop";
|
||||
startupWMClass = "Vesktop";
|
||||
genericName = "Internet Messenger";
|
||||
keywords = [
|
||||
"discord"
|
||||
"vencord"
|
||||
"electron"
|
||||
"chat"
|
||||
];
|
||||
categories = [
|
||||
"Network"
|
||||
"InstantMessaging"
|
||||
"Chat"
|
||||
];
|
||||
});
|
||||
|
||||
passthru = {
|
||||
inherit (finalAttrs) pnpmDeps;
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
@ -199,10 +179,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
vgskye
|
||||
pluiedev
|
||||
];
|
||||
mainProgram = "vesktop";
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
mainProgram = "vesktop";
|
||||
};
|
||||
})
|
||||
|
@ -1,13 +1,13 @@
|
||||
diff --git a/src/main/constants.ts b/src/main/constants.ts
|
||||
index d5c5fa6..a1b32f1 100644
|
||||
index 40d91a5..7b46bbf 100644
|
||||
--- a/src/main/constants.ts
|
||||
+++ b/src/main/constants.ts
|
||||
@@ -16,7 +16,7 @@ export const VENCORD_THEMES_DIR = join(DATA_DIR, "themes");
|
||||
// needs to be inline require because of circular dependency
|
||||
@@ -49,7 +49,7 @@ export const VENCORD_THEMES_DIR = join(DATA_DIR, "themes");
|
||||
// as otherwise "DATA_DIR" (which is used by ./settings) will be uninitialised
|
||||
export const VENCORD_FILES_DIR =
|
||||
- (require("./settings") as typeof import("./settings")).Settings.store.vencordDir || join(DATA_DIR, "vencordDist");
|
||||
+ (require("./settings") as typeof import("./settings")).Settings.store.vencordDir || "@vencord@";
|
||||
(require("./settings") as typeof import("./settings")).State.store.vencordDir ||
|
||||
- join(SESSION_DATA_DIR, "vencordFiles");
|
||||
+ "@vencord@";
|
||||
|
||||
export const USER_AGENT = `Vesktop/${app.getVersion()} (https://github.com/Vencord/Vesktop)`;
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"darwin": {
|
||||
"hash": "sha256-LPH9JbOXOBjT4vMWNGMvQYDVnTE6p2tFTlOe8HOFsk0=",
|
||||
"version": "0.2024.10.08.08.02.stable_02"
|
||||
"hash": "sha256-AtKLtEhibD5sHNcjmScxykLd2si5dwGDTFd0NldbHFQ=",
|
||||
"version": "0.2024.10.29.08.02.stable_02"
|
||||
},
|
||||
"linux_x86_64": {
|
||||
"hash": "sha256-jwbwRgQ7WR04zCki7PQuuMZD7v2tFl3Gm1olZ28FAp8=",
|
||||
"version": "0.2024.10.08.08.02.stable_02"
|
||||
"hash": "sha256-jKk80+9XKLzM68a9YQFIddxzRLzVc8vmPmnS3ZJ+9s8=",
|
||||
"version": "0.2024.10.29.08.02.stable_02"
|
||||
},
|
||||
"linux_aarch64": {
|
||||
"hash": "sha256-Ticn8OMYHWQT88WQSpgcT/kBVnHyoDHNhTk0m4T45bQ=",
|
||||
"version": "0.2024.10.08.08.02.stable_02"
|
||||
"hash": "sha256-k1OkiK3reedJQINK8vZYP7G2Mm9KnWV+RuvHZZJYHqI=",
|
||||
"version": "0.2024.10.29.08.02.stable_02"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user